Class: ActionController::AbstractRequest

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

Direct Known Subclasses

RackRequest

Instance Method Summary collapse

Methods included from Facebooker::Rails::BackwardsCompatibleParamChecks

#one_or_true, #zero_or_false

Instance Method Details

#query_parameters_with_facebookerObject



23
24
25
26
27
28
29
# File 'lib/facebooker/rails/extensions/action_controller.rb', line 23

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

#relative_url_rootObject



4
5
6
# File 'lib/facebooker/rails/facebook_url_rewriting.rb', line 4

def relative_url_root
  Facebooker.path_prefix
end

#request_method_with_facebookerObject



5
6
7
8
9
10
11
12
# File 'lib/facebooker/rails/facebook_request_fix.rb', line 5

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)


18
19
20
21
22
# File 'lib/facebooker/rails/facebook_request_fix.rb', line 18

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