Class: AttachmentsController

Inherits:
ApplicationController show all
Includes:
PagesCore::RangedResponse
Defined in:
app/controllers/attachments_controller.rb

Instance Attribute Summary

Attributes included from PagesCore::Authentication

#current_user

Instance Method Summary collapse

Methods included from PagesCore::RangedResponse

#send_ranged_data

Methods included from PagesCore::StaticCacheController

#disable_static_cache!, #static_cached?

Methods included from PagesCore::PoliciesHelper

#policy, #verify_policy, #verify_policy_with_proc

Methods included from PagesCore::ProcessTitler

inc_number_of_requests, original_title

Methods included from PagesCore::LocalesHelper

#content_locale

Methods included from PagesCore::ErrorRenderer

#render_error

Methods included from PagesCore::Authentication

#authenticate!, #deauthenticate!, #logged_in?

Instance Method Details

#downloadObject



15
16
17
# File 'app/controllers/attachments_controller.rb', line 15

def download
  send_attachment disposition: "attachment"
end

#showObject



11
12
13
# File 'app/controllers/attachments_controller.rb', line 11

def show
  send_attachment
end