Method: Facebooker::Rails::FacebookFormBuilder#add_default_name_and_id
- Defined in:
- lib/facebooker/rails/facebook_form_builder.rb
#add_default_name_and_id(options, method) ⇒ Object
106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/facebooker/rails/facebook_form_builder.rb', line 106 def add_default_name_and_id(, method) @method_name = method if .has_key?("index") ["name"] ||= tag_name_with_index(["index"]) ["id"] ||= tag_id_with_index(["index"]) .delete("index") else ["name"] ||= tag_name + (.has_key?('multiple') ? '[]' : '') ["id"] ||= "#{sanitized_object_name}_#{sanitized_method_name}" end end |