开发者

Rails, Clearance, using User ID after logging in?

开发者 https://www.devze.com 2022-12-24 10:37 出处:网络
I\'m using clearance (https://gi开发者_运维知识库thub.com/thoughtbot/clearance/wiki) for authentication in my rails app. But I\'m trying to figure out how to grab the user\'s ID in a view after loggin

I'm using clearance (https://gi开发者_运维知识库thub.com/thoughtbot/clearance/wiki) for authentication in my rails app. But I'm trying to figure out how to grab the user's ID in a view after logging in.

Any ideas?


Based on this, looks like

current_user.id

should do the trick.

0

精彩评论

暂无评论...
验证码 换一张
取 消