Class: Pageflow::RevisionsController

Inherits:
ApplicationController show all
Includes:
ControllerDelegation, QuotaVerification
Defined in:
app/controllers/pageflow/revisions_controller.rb

Instance Method Summary collapse

Methods included from ControllerDelegation

#delegate_to_rack_app!, #dispatch

Instance Method Details

#depublish_currentObject



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

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



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

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



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

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

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

  render template: 'pageflow/entries/stylesheet'
end