hello everybody!!!!! I want to pass the value of my select to another controller my code is this my user controller def index @users = User.find(:all) ........ my view index <h1>broker</h1> <p> Seleccione un tipo de usuario</p> <p> <%= select (:user , :user_id, @users.map{ |p| [p.name, p.id] }) %> </p> I don´t know do the submit with form?? any idea!!! thanks -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 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 -~----------~----~----~----~------~----~------~--~---
Leonard Yera wrote:> hello everybody!!!!! > > I want to pass the value of my select to another controller my code is > this > > my user controller > > def index > @users = User.find(:all) > ........ > > my view index > <h1>broker</h1> > <p> Seleccione un tipo de usuario</p> > > <p> > <%= select (:user , :user_id, @users.map{ |p| [p.name, p.id] }) %> > </p> > > I don´t know do the submit with form?? > > any idea!!! > thanksto do a submit with a form would look like this: <% form_tag :action => ''method_nam'' do -%> <%= submit_tag "Next", :class => ''inputsubmit'' %> <% end -%> if you want to call a different controller from the one you are currently in do this: <% form_tag :action => ''method_nam'', :controller => ''controller_name'' do -%> <%= submit_tag "Next", :class => ''inputsubmit'' %> <% end -%> A reference I use all the time is the rails api: http://api.rubyonrails.org/ -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 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 -~----------~----~----~----~------~----~------~--~---
thanks very much, I´m going to doing -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 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 -~----------~----~----~----~------~----~------~--~---