Class: Pageflow::Editor::EntryPublicationsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Pageflow::Editor::EntryPublicationsController
- Defined in:
- app/controllers/pageflow/editor/entry_publications_controller.rb
Instance Method Summary collapse
Instance Method Details
#check ⇒ Object
22 23 24 25 26 27 28 |
# File 'app/controllers/pageflow/editor/entry_publications_controller.rb', line 22 def check entry = Entry.find(params[:entry_id]) (:publish, entry) @entry_publication = build_entry_publication(entry) end |
#create ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/controllers/pageflow/editor/entry_publications_controller.rb', line 8 def create entry = Entry.find(params[:entry_id]) (: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) end |