ruby on rails - How to get the current user that is logged in via active admin? -


i know how current user logged in via active admin gui?

homepage: http://www.activeadmin.info/

thanks in advance

model

admin_user.rb

class adminuser < activerecord::base   # include default devise modules. others available are:   # :token_authenticatable, :confirmable,   # :lockable, :timeoutable , :omniauthable   devise :database_authenticatable,           :recoverable, :rememberable, :trackable, :validatable    # setup accessible (or protected) attributes model   attr_accessible :email, :password, :password_confirmation, :remember_me, :id  , :admin_permission   # attr_accessible :title, :body   has_one :admin_permission   validates_uniqueness_of :email    def self.current_logged_user     # ?   end end 

update

when try use method 'current_user' in dashboard.rb or active admin related file, apparently not implemented.

output

undefined local variable or method `current_user' 

the active admin user called adminuser default. corresponding devise helper method therefore current_admin_user.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -