Pale Horse wrote:
> I want to set a default on a collection select. There must be a way to
> do this, but how?
> 
>> :default => "kdjng" (?)


 <%= collection_select(:category, :id, @categories, :id, :name, 
{},{:size=>10}) %>
will have the value of @category selected
so you can set the default value to @category and then use the 
collection select.

This was the method I used as I had to make different categories as 
default selected one for different users.There might be some better ways 
too.Eager to know them too.

-- 
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 [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-talk?hl=en.

Reply via email to