Sha256: d8641412395ec521d4e6d09ac3da767f219fac2a5a031711815a8d1a5765186b
Contents?: true
Size: 617 Bytes
Versions: 5
Compression:
Stored size: 617 Bytes
Contents
module Protected class ApplicationController < ActionController::Base before_filter :authenticate_user! before_filter :set_cache_buster protect_from_forgery 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 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 end end
Version data entries
5 entries across 5 versions & 1 rubygems