When I write this line <%= round_form.select :round, :action, ["a", "b", "c", "d"] %> I get this. What gives? undefined method `merge'' for ["a", "b", "c", "d"]:Array --~--~---------~--~----~------------~-------~--~----~ 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 http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
When I write this line <%= round_form.select :round, :action, ["a", "b", "c", "d"] %> I get this. What gives? undefined method `merge'' for ["a", "b", "c", "d"]:Array --~--~---------~--~----~------------~-------~--~----~ 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 http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Round is my model and action is a field in that model. I simply want to be able to set that field to a b c or d. On Apr 9, 6:19 pm, edberner <eber...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> When I write this line > <%= round_form.select :round, :action, ["a", "b", "c", "d"] %> > > I get this. What gives? > undefined method `merge'' for ["a", "b", "c", "d"]:Array--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Apr 9, 11:29 pm, edberner <eber...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Round is my model and action is a field in that model. I simply want > to be able to set that field to a b c or d. > > On Apr 9, 6:19 pm, edberner <eber...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > When I write this line > > <%= round_form.select :round, :action, ["a", "b", "c", "d"] %> > > > I get this. What gives? > > undefined method `merge'' for ["a", "b", "c", "d"]:ArrayI''m guessing round_form is the form builder yielded by a form_for, in which (case at least from the name) it''s already bound to round - you can just say round_form.select :action, ["a", "b", "c", "d"] Right now rails is assuming your last argument is a hash of options Fred --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---