Class: PandaCms::Admin::BlockContentsController
- Inherits:
-
PandaCms::ApplicationController
- Object
- ActionController::Base
- PandaCms::ApplicationController
- PandaCms::Admin::BlockContentsController
- Defined in:
- app/controllers/panda_cms/admin/block_contents_controller.rb
Instance Method Summary collapse
Methods inherited from PandaCms::ApplicationController
#add_breadcrumb, #authenticate_admin_user!, #authenticate_user!, #breadcrumbs, #current_user, #set_current_request_details, #user_signed_in?
Methods included from PandaCms::ApplicationHelper
#active_link?, #block_link_to, #component, #level_indent, #menu_indent, #nav_class, #nav_highlight_colour_classes, #panda_cms_editor, #panda_cms_form_with, #selected_nav_highlight_colour_classes, #table_indent, #title_tag
Instance Method Details
#update ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'app/controllers/panda_cms/admin/block_contents_controller.rb', line 13 def update if @block_content.update!(content: params[:content]) @block_content.page.touch # Update the page's updated_at render json: @block_content, status: :ok else render json: @block_content.errors, status: :unprocessable_entity end end |