> In the spirit of common naming conventions, I reckon the value_method
> and text_method parameters should default to :id and :name
> respectively. What are everyone's views on this?


While those are very reasonable defaults it seems like the error message
would have to be quite elaborate in case the model doesn't have a :name
attribute.  I think it would be quite difficult for a newbie to write:
<%= collection_select :user, :login, @users %>
and try to debug:
NoMethodError: undefined method `name' for #<User:0x340948c>

Given that 'name' doesn't appear in their code the average developer would
be confused.

::Jack Danger

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to