Class: Pageflow::Editor::WidgetsController Private

Inherits:
ApplicationController show all
Defined in:
app/controllers/pageflow/editor/widgets_controller.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#batchObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



17
18
19
20
21
22
23
# File 'app/controllers/pageflow/editor/widgets_controller.rb', line 17

def batch
  subject = find_subject
  authorize!(:edit, subject.to_model)

  subject.widgets.batch_update!(widget_batch_params)
  render(json: {})
end

#indexObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



9
10
11
12
13
14
15
# File 'app/controllers/pageflow/editor/widgets_controller.rb', line 9

def index
  subject = find_subject
  authorize!(:index_widgets_for, subject.to_model)

  @widgets = subject.resolve_widgets(include_placeholders: true)
  respond_with(@widgets)
end