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



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

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
16
17
18
# 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)
  I18n.locale = @entry.locale

  @widget_scope = :preview
  render :template => 'pageflow/entries/show'
end