7stud -- wrote in post #1016089: > Leoncio Caminha wrote in post #1016087: >> the field name: >> collection_select(:post, :author_id, Author.all, :id, >> :name_with_initial, :prompt => true) >> will generate: >> >> <select name="post[author_id]"> >> <option value="">Please select</option> >> <option value="1" selected="selected">D. Heinemeier Hansson</option> >> <option value="2">D. Thomas</option> >> <option value="3">M. Clark</option> >> </select> >> >> > > Okay, so it looks like the first two arguments determine the name of the > select?
And even that isn't entirely correct. Apparently, the name of the select has to be of the form: an_existing_model[:an_existing_field_name_in_that_model] which doesn't make any sense to me. > But don't the arguments change if you call: > > f.collection_select(....) > > > ??? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.