Module: UbiquitousUser::Usable

Includes:
Helpers
Defined in:
lib/ubiquitous_user/ubiquitous_user.rb

Instance Method Summary collapse

Methods included from Helpers

#current_user

Instance Method Details

#current_user=(new_user) ⇒ Object



44
45
46
47
# File 'lib/ubiquitous_user/ubiquitous_user.rb', line 44

def current_user=(new_user)
  session[:user_id] = new_user != nil ? new_user.id : nil
  @ubiquitous_user = new_user
end