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
13 14 15 16 17 18 |
# File 'app/controllers/hyrax/pages_controller.rb', line 13 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
9 10 11 |
# File 'app/controllers/hyrax/pages_controller.rb', line 9 def show @page = ContentBlock.for(params[:key]) end |
#update ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'app/controllers/hyrax/pages_controller.rb', line 20 def update respond_to do |format| if @page.update(value: update_value_from_params) format.html { redirect_to hyrax.edit_pages_path, notice: t(:'hyrax.pages.updated') } else format.html { render :edit } end end end |