Hello, Currently when using the select_tag method with the :multiple => true option the name parameter is set as is. select_tag "access", nil, :multiple => true # => <select id="access" multiple="multiple" name="access"></select> Although for the mulitple values to be sent the name should instead be "access[]". So you can do that with the following... select_tag "access", nil, :name => "access[]", :multiple => true # => <select id="access" multiple="multiple" name="access[]"></select> Should this be set automatically where the method checks for the :multiple option as true and sets the name to "access[]"? So with :multiple => true... select_tag "access", nil, :multiple => true # => <select id="access" multiple="multiple" name="access[]"></select> and without :multiple => true... select_tag "access", nil # => <select id="access" multiple="multiple" name="access"></select> Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
> Should this be set automatically where the method checks for the > :multiple option as true and sets the name to "access[]"? > > So with :multiple => true... > > select_tag "access", nil, :multiple => true > # => <select id="access" multiple="multiple" name="access[]"></select> > > and without :multiple => true... > > select_tag "access", nil > # => <select id="access" multiple="multiple" name="access"></select>This sounds like a nice enhancement, you should have a go at it and send in a patch. There are instructions here: http://rails.lighthouseapp.com/projects/8994/sending-patches Good luck :) -- Cheers Koz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
I''ll make a patch. I just wanted to know if it was worth doing. Thanks On Tue, Sep 30, 2008 at 3:49 AM, Michael Koziarski <michael@koziarski.com> wrote:> >> Should this be set automatically where the method checks for the >> :multiple option as true and sets the name to "access[]"? >> >> So with :multiple => true... >> >> select_tag "access", nil, :multiple => true >> # => <select id="access" multiple="multiple" name="access[]"></select> >> >> and without :multiple => true... >> >> select_tag "access", nil >> # => <select id="access" multiple="multiple" name="access"></select> > > This sounds like a nice enhancement, you should have a go at it and > send in a patch. There are instructions here: > > http://rails.lighthouseapp.com/projects/8994/sending-patches > > Good luck :) > -- > Cheers > > Koz > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Patch submitted... http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1146 Thanks On Tue, Sep 30, 2008 at 9:50 AM, Andrew Kaspick <akaspick@gmail.com> wrote:> I''ll make a patch. I just wanted to know if it was worth doing. > > Thanks > > On Tue, Sep 30, 2008 at 3:49 AM, Michael Koziarski > <michael@koziarski.com> wrote: >> >>> Should this be set automatically where the method checks for the >>> :multiple option as true and sets the name to "access[]"? >>> >>> So with :multiple => true... >>> >>> select_tag "access", nil, :multiple => true >>> # => <select id="access" multiple="multiple" name="access[]"></select> >>> >>> and without :multiple => true... >>> >>> select_tag "access", nil >>> # => <select id="access" multiple="multiple" name="access"></select> >> >> This sounds like a nice enhancement, you should have a go at it and >> send in a patch. There are instructions here: >> >> http://rails.lighthouseapp.com/projects/8994/sending-patches >> >> Good luck :) >> -- >> Cheers >> >> Koz >> >> >> >> >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---