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
  site = Site.for_request(request).with_home_url.first!

  redirect_to(site.home_url, allow_other_host: true)
end

#manifestObject

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
35
36
37
38
# File 'app/controllers/pageflow/entries_controller.rb', line 28

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

      return head :not_found unless entry.entry_type.web_app_manifest

      render json: entry.entry_type.web_app_manifest.call(entry)
    end
  end
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.



48
49
50
51
52
53
# File 'app/controllers/pageflow/entries_controller.rb', line 48

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 = find_by_permalink || find_by_slug

      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.



40
41
42
43
44
45
46
# File 'app/controllers/pageflow/entries_controller.rb', line 40

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