Class: Workarea::Admin::ContentBlockDraftsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/workarea/admin/content_block_drafts_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#current_user, #find_sort, #wrap_in_view_model, wrap_in_view_model

Methods included from Publishing

#allow_publishing!, #allow_publishing?, #set_publishing_options

Methods included from Visiting

#most_visited

Instance Method Details

#createObject



4
5
6
7
8
9
10
11
# File 'app/controllers/workarea/admin/content_block_drafts_controller.rb', line 4

def create
  unless params[:block][:hidden_breakpoints].present?
    params[:block][:hidden_breakpoints] = []
  end

  result = Content::BlockDraft.create!(params[:block])
  render json: { id: result.to_param }
end