Class: ActionController::Request

Inherits:
Object
  • Object
show all
Includes:
Facebooker::Rails::BackwardsCompatibleParamChecks
Defined in:
lib/facebooker/rails/facebook_request_fix_2-3.rb,
lib/facebooker/rails/extensions/action_controller.rb

Instance Method Summary collapse

Methods included from Facebooker::Rails::BackwardsCompatibleParamChecks

#one_or_true, #zero_or_false

Instance Method Details

#query_parameters_with_facebookerObject



34
35
36
37
38
39
40
# File 'lib/facebooker/rails/extensions/action_controller.rb', line 34

def query_parameters_with_facebooker
  if request_parameters.blank?
    query_parameters_without_facebooker
  else
    (query_parameters_without_facebooker||{}).reject {|key,value| key.to_s =~ /^fb_sig/}
  end
end

#request_method_with_facebookerObject



7
8
9
10
11
12
13
14
# File 'lib/facebooker/rails/facebook_request_fix_2-3.rb', line 7

def request_method_with_facebooker
  if parameters[:_method].blank?
    if %w{GET HEAD}.include?(parameters[:fb_sig_request_method])
      parameters[:_method] = parameters[:fb_sig_request_method]
    end
  end
  request_method_without_facebooker
end

#xml_http_request_with_facebooker?Boolean

Returns:

  • (Boolean)


20
21
22
23
24
# File 'lib/facebooker/rails/facebook_request_fix_2-3.rb', line 20

def xml_http_request_with_facebooker?
  one_or_true(parameters["fb_sig_is_mockajax"])  ||
  one_or_true(parameters["fb_sig_is_ajax"]) ||
  xml_http_request_without_facebooker?
end