[Rails] Re: different between these two array method.

2012-07-02 Thread phoe san
Hi Sentil and Colin, á‚ŠThank for your reply message and solution! 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.

Re: [Rails] Re: different between these two array method.

2012-07-02 Thread Colin Law
On 2 July 2012 10:26, phoe san wrote: > <%= 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

[Rails] Re: different between these two array method.

2012-07-02 Thread thil
Hi, + operator won't works in array I think but used as concatenation in staring. Second scenario of your case works fine. Thanks, senthil On Monday, 2 July 2012 14:29:57 UTC+5:30, Ruby-Forum.com User wrote: > > Dear friends, > > What is different between these two array method. > > First

[Rails] Re: different between these two array method.

2012-07-02 Thread phoe san
<%= 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 Firs