Class: PagesCore::Frontend::PageFilesController

Inherits:
FrontendController show all
Defined in:
app/controllers/pages_core/frontend/page_files_controller.rb

Direct Known Subclasses

PageFilesController

Instance Attribute Summary

Attributes included from Authentication

#current_user

Instance Method Summary collapse

Methods inherited from PagesCore::FrontendController

#load_root_pages

Methods included from ApplicationHelper

#page_link, #unique_page

Methods included from PagePathHelper

#page_path, #page_url

Methods included from OpenGraphTagsHelper

#open_graph_properties, #open_graph_tags

Methods included from MetaTagsHelper

#default_meta_image, #default_meta_image?, #meta_description, #meta_description?, #meta_image, #meta_image?, #meta_keywords, #meta_keywords?

Methods included from ImagesHelper

#dynamic_image_tag, #original_dynamic_image_tag, #uncropped_dynamic_image_tag

Methods included from HeadTagsHelper

#document_title, #document_title?, #feed_tags, #google_analytics_tags, #head_tag, #rss_link_tag, #typekit_tags

Methods included from PoliciesHelper

#policy, #verify_policy, #verify_policy_with_proc

Methods included from ProcessTitler

inc_number_of_requests, original_title

Methods included from ErrorRenderer

#render_error

Methods included from Authentication

#authenticate!, #deauthenticate!, #logged_in?

Instance Method Details

#showObject


6
7
8
9
10
11
12
13
# File 'app/controllers/pages_core/frontend/page_files_controller.rb', line 6

def show
  if stale?(etag: @page_file, last_modified: @page_file.updated_at)
    send_data(@page_file.data,
              filename: @page_file.filename,
              type: @page_file.content_type,
              disposition: "inline")
  end
end