Class: Hyrax::PagesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Hyrax::PagesController
- Defined in:
- app/controllers/hyrax/pages_controller.rb
Overview
Shows the about and help page
Instance Method Summary collapse
Instance Method Details
#edit ⇒ Object
14 15 16 17 18 19 |
# File 'app/controllers/hyrax/pages_controller.rb', line 14 def edit t(:'hyrax.controls.home'), root_path t(:'hyrax.dashboard.breadcrumbs.admin'), hyrax.dashboard_path t(:'hyrax.admin.sidebar.configuration'), '#' t(:'hyrax.admin.sidebar.pages'), hyrax.edit_pages_path end |
#show ⇒ Object
10 11 12 |
# File 'app/controllers/hyrax/pages_controller.rb', line 10 def show @page = ContentBlock.for(params[:key]) end |
#update ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'app/controllers/hyrax/pages_controller.rb', line 21 def update respond_to do |format| if @page.update(value: update_value_from_params) redirect_path = "#{hyrax.edit_pages_path}##{params[:content_block].keys.first}" format.html { redirect_to redirect_path, notice: t(:'hyrax.pages.updated') } else format.html { render :edit } end end end |