Class: Protected::ApplicationController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/protected/application_controller.rb

Instance Method Summary collapse

Instance Method Details

#pagination_params(opts = {}) ⇒ Object



8
9
10
# File 'app/controllers/protected/application_controller.rb', line 8

def pagination_params(opts = {})
  { :page => params[:page].present? ? params[:page].to_i : 1, :per_page => params[:per_page].present? ? params[:per_page].to_i : 12 }.merge(opts)
end

#set_cache_busterObject



12
13
14
15
16
# File 'app/controllers/protected/application_controller.rb', line 12

def set_cache_buster
  response.headers["Cache-Control"] = "no-cache, no-store, max-age=0, must-revalidate"
  response.headers["Pragma"] = "no-cache"
  response.headers["Expires"] = "Fri, 01 Jan 1990 00:00:00 GMT"
end