Class Facebooker::Rails::IntegrationSession
In: lib/facebooker/rails/integration_session.rb
Parent: ActionController::Integration::Session

Methods

get   process   reset!  

Included Modules

Facebooker::Rails::TestHelpers

Attributes

canvas  [RW] 
default_request_params  [RW] 

Public Instance methods

[Source]

# File lib/facebooker/rails/integration_session.rb, line 20
  def get(path, parameters = nil, headers = nil)
    if canvas
      post path, (parameters || {}).merge('fb_sig_request_method' => 'GET'), headers
    else
      super path, parameters, headers
    end
  end

[Source]

# File lib/facebooker/rails/integration_session.rb, line 7
  def process(method, path, parameters = nil, headers = nil)
    if canvas
      parameters = facebook_params(@default_request_params.merge(parameters || {}))
    end
    super method, path, parameters, headers
  end

[Source]

# File lib/facebooker/rails/integration_session.rb, line 14
  def reset!
    self.default_request_params = {:fb_sig_in_canvas => '1', :fb_sig_api_key => Facebooker::Session.api_key}.with_indifferent_access
    self.canvas = true
    super
  end

[Validate]