Class: Pageflow::EntriesController Private

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

#indexObject

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.



8
9
10
11
12
# File 'app/controllers/pageflow/entries_controller.rb', line 8

def index
  theming = Theming.for_request(request).with_home_url.first!

  redirect_to(theming.home_url)
end

#pageObject

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.



36
37
38
39
40
41
# File 'app/controllers/pageflow/entries_controller.rb', line 36

def page
  entry = PublishedEntry.find(params[:id], entry_request_scope)
  index = params[:page_index].split('-').first.to_i

  redirect_to(short_entry_path(entry.to_model, :anchor => entry.pages[index].try(:perma_id)))
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.



14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'app/controllers/pageflow/entries_controller.rb', line 14

def show
  respond_to do |format|
    format.html do
      entry = PublishedEntry.find(params[:id], entry_request_scope)

      return if redirect_according_to_entry_redirect(entry)
      return if redirect_according_to_public_https_mode
      return unless check_entry_password_protection(entry)

      delegate_to_entry_type_frontend_app!(entry)
    end
  end
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.



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

def stylesheet
  respond_to do |format|
    format.css do
      @entry = PublishedEntry.find(params[:id], entry_request_scope)
    end
  end
end