Monday, June 3, 2013

Rails: Get currently logged in user details

On Dev machine - rails console - the below gives the details of the logged in user (i.e. myself)

User.find(:all, :conditions => ["current_sign_in_ip != '' "])

(Found it here - https://groups.google.com/forum/?fromgroups#!topic/plataformatec-devise/tOKU_jcWNp0 )

No comments:

Post a Comment

Followers

Blog Archive