Ruby on Rails Monday, July 2, 2012

<%= collection_select(:sport_name,count,Sport.find( :all, :order => 'id'
),
:id, :sport_name, {:selected =>@sport_id})%>

Collection_select Value.
We take data from collection_select by params[:sport_name]

In Controller, we use this
ps_array = params[:sport_name]
we get the data

First array method , It doesn't work.
Second Method , It Work.

Regards,

phoesan

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en-US.

No comments:

Post a Comment