Class: ProfilesController
- Inherits:
-
InheritedResources::Base
- Object
- InheritedResources::Base
- ProfilesController
- Defined in:
- app/controllers/profiles_controller.rb
Instance Method Summary collapse
Instance Method Details
#load_current_user ⇒ Object
6 7 8 9 10 |
# File 'app/controllers/profiles_controller.rb', line 6 def load_current_user unless params[:user_id] @user ||= (current_user ? User.find(current_user.id) : super_user) end end |
#resource ⇒ Object
12 13 14 |
# File 'app/controllers/profiles_controller.rb', line 12 def resource @profile ||= Profile.find_by_user_id(@user.id) end |