Class: Hyrax::ContentBlocksController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/hyrax/content_blocks_controller.rb

Instance Method Summary collapse

Instance Method Details

#editObject



7
8
9
10
11
12
# File 'app/controllers/hyrax/content_blocks_controller.rb', line 7

def edit
  add_breadcrumb t(:'hyrax.controls.home'), root_path
  add_breadcrumb t(:'hyrax.dashboard.breadcrumbs.admin'), hyrax.dashboard_path
  add_breadcrumb t(:'hyrax.admin.sidebar.configuration'), '#'
  add_breadcrumb t(:'hyrax.admin.sidebar.content_blocks'), hyrax.edit_content_blocks_path
end

#updateObject



14
15
16
17
18
19
20
21
22
# File 'app/controllers/hyrax/content_blocks_controller.rb', line 14

def update
  respond_to do |format|
    if @content_block.update(value: update_value_from_params)
      format.html { redirect_to hyrax.edit_content_blocks_path, notice: t(:'hyrax.content_blocks.updated') }
    else
      format.html { render :edit }
    end
  end
end