Sha256: 7111e3e7eafd9867b25c951342a1f7448d6c232cdb8ae30f71c4972353187d17
Contents?: true
Size: 385 Bytes
Versions: 13
Compression:
Stored size: 385 Bytes
Contents
class ProfilesController < InheritedResources::Base respond_to :html before_filter :load_current_user belongs_to :user, :optional => true, :singleton=>true def load_current_user unless params[:user_id] @user ||= (current_user ? User.find(current_user.id) : User.super_user) end end def resource @profile ||= Profile.find_by_user_id(@user.id) end end
Version data entries
13 entries across 13 versions & 1 rubygems