Sha256: 518debb0a2a4b7972c6bf0cfc581160e5fb3d812924dad1afddad22f1080185c
Contents?: true
Size: 525 Bytes
Versions: 28
Compression:
Stored size: 525 Bytes
Contents
# frozen_string_literal: true module PagesCore module Frontend class PageFilesController < ::FrontendController include PagesCore::AttachmentsHelper before_action :find_page_file, only: %i[show] def show unless stale?(etag: @page_file, last_modified: @page_file.updated_at) return end redirect_to attachment_path(@page_file.attachment) end private def find_page_file @page_file = PageFile.find(params[:id]) end end end end
Version data entries
28 entries across 28 versions & 1 rubygems