Rajiv M Ranganath
2008-Aug-14 10:27 UTC
[Facebooker-talk] facebook_form_builder.rb - add_default_name_and_id
Hi there,
I have a model called SignUp with a couple of text_fields and a
datetime_select. When I was trying to build a form using the
facebook_form_for helper, I realized that the controller was getting
values from datetime_select correctly but was missing data from the
text fields.
I narrowed down the issue to add_default_name_and_id method and when
changed it from
def add_default_name_and_id(options,method)
options[:name] = "#{object.class.name.downcase}[#{method}]"
options[:id] ||= "#{object.class.name.downcase}_#{method}"
end
to
def add_default_name_and_id(options,method)
options[:name] = "#{object.class.name.underscore}[#{method}]"
options[:id] ||= "#{object.class.name.underscore}_#{method}"
end
things started working as expected. Is this a bug or am I doing not
doing something the rails way?
Please comment.
Best,
Rajiv
Maybe Matching Threads
- form error with datetime select
- Why is select helpers not using options in add_default_name_and_id ?
- How can i specify default time to datetime_select tag
- Uploading photos using facebook & attachment_fu
- In datetime_select, :order does not work, but it works for date_select Why
