Class: Pageflow::Editor::EntryPublicationsController Private

Inherits:
ApplicationController show all
Defined in:
app/controllers/pageflow/editor/entry_publications_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

#checkObject

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.



25
26
27
28
29
30
31
# File 'app/controllers/pageflow/editor/entry_publications_controller.rb', line 25

def check
  entry = Entry.find(params[:entry_id])

  authorize!(:publish, entry)

  @entry_publication = build_entry_publication(entry)
end

#createObject

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
16
17
18
19
20
21
22
23
# File 'app/controllers/pageflow/editor/entry_publications_controller.rb', line 9

def create
  entry = Entry.find(params[:entry_id])

  authorize!(:publish, entry)
  verify_edit_lock!(entry)

  @entry_publication = build_entry_publication(entry)
  @entry_publication.save!

  render(action: :check)
rescue Quota::ExceededError
  render(action: :check, status: :forbidden)
rescue Entry::PasswordMissingError
  head(:bad_request)
end