Class: MicroCms::ContentBlockController

Inherits:
ApplicationController show all
Defined in:
app/controllers/micro_cms/content_block_controller.rb

Instance Method Summary collapse

Instance Method Details

#updateObject



7
8
9
10
11
12
13
14
15
16
17
# File 'app/controllers/micro_cms/content_block_controller.rb', line 7

def update
  check_authorization_token

  respond_to do |format|
    format.js do
      ContentBlock.find_by!(path: params[:path]).update(content: content_block_params[:content])

      head :no_content
    end
  end
end