Class: ProfilesController

Inherits:
InheritedResources::Base
  • Object
show all
Defined in:
app/controllers/profiles_controller.rb

Instance Method Summary collapse

Instance Method Details

#load_current_userObject



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

#resourceObject



12
13
14
# File 'app/controllers/profiles_controller.rb', line 12

def resource
  @profile ||= Profile.find_by_user_id(@user.id)
end