Class: ActionController::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/ie_iframe_cookies.rb

Instance Method Summary collapse

Instance Method Details

#normal_cookies_for_ie_in_iframes(options = {}) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/ie_iframe_cookies.rb', line 14

def normal_cookies_for_ie_in_iframes(options={})
  if request.normal_cookies_for_ie_in_iframes? or options[:force]
    headers['P3P'] = 'CP="ALL DSP COR CURa ADMa DEVa OUR IND COM NAV"'
    if request.get? or request.head?
      fresh_when :etag => rand(100_000_000) + 1, :last_modified => Time.now
    end
  end
end

#normal_cookies_for_ie_in_iframes!Object



7
8
9
10
11
12
# File 'lib/ie_iframe_cookies.rb', line 7

def normal_cookies_for_ie_in_iframes!
  if request.ie_iframe_cookies_browser_is_ie?
    normal_cookies_for_ie_in_iframes(:force => true)
    cookies["using_iframes_in_ie"] = true
  end
end