Class: Pageflow::RevisionsController

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

Instance Method Summary collapse

Instance Method Details

#depublish_currentObject


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

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


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

def show
  revision = Revision.find(params[:id])
  authorize!(:show, revision) unless request.format.css?

  @entry = PublishedEntry.new(revision.entry, revision)
  render :template => 'pageflow/entries/show'
end