Class: Hyrax::Dashboard::ProfilesController
- Inherits:
-
UsersController
- Object
- ApplicationController
- UsersController
- Hyrax::Dashboard::ProfilesController
- Defined in:
- app/controllers/hyrax/dashboard/profiles_controller.rb
Overview
Shows and edit the profile of the current_user
Instance Method Summary collapse
-
#edit ⇒ Object
Display form for users to edit their profile information.
- #show ⇒ Object
-
#update ⇒ Object
Process changes from profile form.
Methods inherited from UsersController
Instance Method Details
#edit ⇒ Object
Display form for users to edit their profile information
16 17 18 19 20 21 22 |
# File 'app/controllers/hyrax/dashboard/profiles_controller.rb', line 16 def edit t(:'hyrax.controls.home'), root_path t(:'hyrax.dashboard.breadcrumbs.admin'), hyrax.dashboard_path t(:'hyrax.admin.sidebar.profile'), hyrax.dashboard_profile_path @trophies = Hyrax::TrophyPresenter.find_by_user(@user) end |
#show ⇒ Object
9 10 11 12 13 |
# File 'app/controllers/hyrax/dashboard/profiles_controller.rb', line 9 def show t(:'hyrax.controls.home'), root_path t(:'hyrax.dashboard.breadcrumbs.admin'), hyrax.dashboard_path t(:'hyrax.admin.sidebar.profile'), hyrax.dashboard_profile_path end |
#update ⇒ Object
Process changes from profile form
25 26 27 28 29 30 31 32 |
# File 'app/controllers/hyrax/dashboard/profiles_controller.rb', line 25 def update if conditionally_update handle_successful_update redirect_to hyrax.dashboard_profile_path(@user.to_param), notice: "Your profile has been updated" else redirect_to hyrax.edit_dashboard_profile_path(@user.to_param), alert: @user.errors. end end |