Class: ProfilesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ProfilesController
- Defined in:
- app/controllers/profiles_controller.rb
Instance Method Summary collapse
Instance Method Details
#edit ⇒ Object
10 11 |
# File 'app/controllers/profiles_controller.rb', line 10 def edit end |
#history ⇒ Object
26 27 28 |
# File 'app/controllers/profiles_controller.rb', line 26 def history @activities = doer.activities.by_recent end |
#show ⇒ Object
7 8 |
# File 'app/controllers/profiles_controller.rb', line 7 def show end |
#update ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/controllers/profiles_controller.rb', line 13 def update if @profile.update_attributes(profile_params) if params[:profile][:portrait].present? render :crop ## Render the view for cropping else Activity.create doer_id: current_user.id, message: "performed a profile edit. See #{view_context.link_to 'public profile', member_path(@profile)}." redirect_to profile_path, notice: "<strong><span class=\"glyphicon glyphicon-ok-sign\"></span> Success!</strong> Your profile was updated." end else render action: "edit", warning: "<strong>Attention!</strong> A problem occurred while trying to update your profile. Plese try again." end end |