I''m trying to work through a simple tutorial on rails
The tutorial calls for adding the following:
<%= select ("cruncher", "", {''red''
=> ''red'', ''green'' =>
''green'',
''blue'' => ''blue''}, {}, {:multiple =>
true, :size => 3 })%>
to produce:
<select id="cruncher_" multiple="multiple"
name="cruncher[]"
size="3">...
however the code produces (note the duplicate array declarations):
<select id="cruncher_" multiple="multiple"
name="cruncher[][]"
size="3">....
-- RoR 2.01
Thanks for any help.
Rick
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
On 1/11/08, rnew <ricknew-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m trying to work through a simple tutorial on rails > > The tutorial calls for adding the following: > > <%= select ("cruncher", "", {''red'' => ''red'', ''green'' => ''green'', > ''blue'' => ''blue''}, {}, {:multiple => true, :size => 3 })%> > > to produce: > <select id="cruncher_" multiple="multiple" name="cruncher[]" > size="3">... > > however the code produces (note the duplicate array declarations): > <select id="cruncher_" multiple="multiple" name="cruncher[][]" > size="3">....See if this helps: http://destiney.com/blog/rubyonrails-select-helper -- Greg Donald http://destiney.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 http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks, I''ll give it a try. On Jan 13, 9:16 am, "Greg Donald" <gdon...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 1/11/08, rnew <rick...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I''m trying to work through a simple tutorial on rails > > > The tutorial calls for adding the following: > > > <%= select ("cruncher", "", {''red'' => ''red'', ''green'' => ''green'', > > ''blue'' => ''blue''}, {}, {:multiple => true, :size => 3 })%> > > > to produce: > > <select id="cruncher_" multiple="multiple" name="cruncher[]" > > size="3">... > > > however the code produces (note the duplicate array declarations): > > <select id="cruncher_" multiple="multiple" name="cruncher[][]" > > size="3">.... > > See if this helps: > > http://destiney.com/blog/rubyonrails-select-helper > > -- > Greg Donaldhttp://destiney.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 http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---