this is my view code <%= f.collection_select(:user, :province_id , @provinces ,:id , :name) %> and this is my controller code params[:user_province_id] it is giving nothing :( when i use observe field and use "params[:user_province_id]" in controller then it gives the value easily. but when i submit the form, this collection_select gives me nothing. i dont know what is the problem . plz n e one help me out thanx in advance -- Posted via 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Maurício Linhares
2009-Feb-15 16:18 UTC
Re: how to get the value of Collection_select in controller
Use: params[:user][:province_id] - Maurício Linhares alinhavado.wordpress.com (pt-br) | blog.codevader.com (en) On Sun, Feb 15, 2009 at 9:40 AM, Hamid Raza <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > this is my view code > <%= f.collection_select(:user, :province_id , @provinces ,:id , :name) > %> > and this is my > controller code > > params[:user_province_id] > > it is giving nothing :( > when i use observe field and use "params[:user_province_id]" in > controller then it gives the value easily. > > but when i submit the form, this collection_select gives me nothing. > > i dont know what is the problem . > plz n e one help me out > > > thanx in advance > -- > Posted via 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hamid Raza
2009-Feb-15 21:01 UTC
Re: how to get the value of Collection_select in controller
Maurício Linhares wrote:> Use: > > params[:user][:province_id] > > - > Maur�cio Linhares > alinhavado.wordpress.com (pt-br) | blog.codevader.com > (en) > > > > On Sun, Feb 15, 2009 at 9:40 AM, Hamid RazaThanks a lot Maurício Linhares. It worked for me :) -- Posted via 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---