Module: ActionController::Rendering

Defined in:
lib/rails-no-cache.rb

Instance Method Summary collapse

Instance Method Details

#render(*args) ⇒ Object

This re-opens render



9
10
11
12
13
14
15
# File 'lib/rails-no-cache.rb', line 9

def render(*args) #:nodoc:
  render_original_no_cache(*args)
  self.headers["Cache-Control"] = "no-cache, no-store, max-age=0, must-revalidate"
  self.headers["Pragma"] = "no-cache"
  self.headers["Expires"] = "Fri, 01 Jan 1990 00:00:00 GMT"
  response_body
end

#render_original_no_cacheObject

rename original method for extending



6
# File 'lib/rails-no-cache.rb', line 6

alias_method :render_original_no_cache, :render