Class: Pageflow::RevisionsController Private

Inherits:
ApplicationController show all
Includes:
ControllerDelegation, QuotaVerification
Defined in:
app/controllers/pageflow/revisions_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

Methods included from ControllerDelegation

#delegate_to_rack_app!, #dispatch

Instance Method Details

#depublish_currentObject

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.



27
28
29
30
31
32
33
# File 'app/controllers/pageflow/revisions_controller.rb', line 27

def depublish_current
  entry = Entry.find(params[:entry_id])
  authorize!(:publish, entry)

  entry.revisions.depublish_all
  redirect_to(main_app.admin_entry_path(entry))
end

#showObject

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.



11
12
13
14
15
16
17
# File 'app/controllers/pageflow/revisions_controller.rb', line 11

def show
  revision = Revision.find(params[:id])
  authorize!(:show, revision)

  entry = PublishedEntry.new(revision.entry, revision)
  delegate_to_entry_type_frontend_app!(entry)
end

#stylesheetObject

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.



19
20
21
22
23
24
25
# File 'app/controllers/pageflow/revisions_controller.rb', line 19

def stylesheet
  revision = Revision.find(params[:id])

  @entry = PublishedEntry.new(revision.entry, revision)

  render template: 'pageflow/entries/stylesheet'
end