Module: Cms::S3::ContentController

Defined in:
lib/bcms_s3/s3_module.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(controller_class) ⇒ Object



10
11
12
# File 'lib/bcms_s3/s3_module.rb', line 10

def self.included(controller_class)
  controller_class.alias_method_chain :render_page_with_caching, :s3
end

Instance Method Details

#render_page_with_caching_with_s3Object



13
14
15
16
# File 'lib/bcms_s3/s3_module.rb', line 13

def render_page_with_caching_with_s3
  render_page
  response.headers['Cache-Control'] = 'public, max-age=300' if Cms::S3.heroku_caching
end