Module: Facebooker2::Rails::Helpers::RequestForms
- Included in:
- Facebooker2::Rails::Helpers
- Defined in:
- lib/facebooker2/rails/helpers/request_forms.rb
Instance Method Summary (collapse)
- - (Object) fb_forgery_protection_token_tag
- - (Object) fb_multi_friend_selector(message, options = {}, &block)
- - (Object) fb_req_choice(label, url)
- - (Object) fb_request_form(type, url, message, options = {}, &block)
Instance Method Details
- (Object) fb_forgery_protection_token_tag
21 22 23 24 25 26 27 |
# File 'lib/facebooker2/rails/helpers/request_forms.rb', line 21 def fb_forgery_protection_token_tag unless protect_against_forgery? '' else tag(:input, :type => "hidden", :name => request_forgery_protection_token.to_s, :value => form_authenticity_token) end end |
- (Object) fb_multi_friend_selector(message, options = {}, &block)
9 10 11 12 |
# File 'lib/facebooker2/rails/helpers/request_forms.rb', line 9 def fb_multi_friend_selector(,={},&block) = fb_stringify_vals({:showborder=>false,:actiontext=>,:max=>20}.merge(.dup)) tag("fb:multi-friend-selector",) end |
- (Object) fb_req_choice(label, url)
5 6 7 |
# File 'lib/facebooker2/rails/helpers/request_forms.rb', line 5 def fb_req_choice(label,url) tag "fb:req-choice",:label=>label,:url=>url end |
- (Object) fb_request_form(type, url, message, options = {}, &block)
14 15 16 17 18 |
# File 'lib/facebooker2/rails/helpers/request_forms.rb', line 14 def fb_request_form(type,url,,={},&block) content = capture(&block) concat(content_tag("fb:request-form", content.to_s + fb_forgery_protection_token_tag, {:action=>url,:method=>"post",:invite=>true,:type=>type,:content=>}.merge())) end |