Hi,
I am using date_select for when a post is being submitted. This is the
tag i use in my view,
<%= date_select("post", "date", :order => [:month,
:day])%>
However this outputs
<select id="post_date_2i" name="post[date(2i)]">
this is probably the way its meant to be, but i cant get it to submit it
to the db colum, date.
Is there a way of getting it to output
<select id="post_date" name="post[date]">?
Thanks Will
--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
i hope some answers your problem too..i''ve got the same issue....and i keep getting a multiparamete assignment error...dave On Oct 7, 1:43 pm, Will Monk <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi, > > I am using date_select for when a post is being submitted. This is the > tag i use in my view, > > <%= date_select("post", "date", :order => [:month, :day])%> > > However this outputs > > <select id="post_date_2i" name="post[date(2i)]"> > > this is probably the way its meant to be, but i cant get it to submit it > to the db colum, date. > Is there a way of getting it to output > > <select id="post_date" name="post[date]">? > > Thanks Will > -- > Posted viahttp://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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
The :prefix parameter sets the name. From the documentation: :prefix - overwrites the default prefix of "date" used for the select names. So specifying "birthday" would give birthday[month] instead of date[month] if passed to the select_month <http://api.rubyonrails.org/classes/ActionView/Helpers/DateHelper.html#M000592> method. http://api.rubyonrails.org/ -Bill dave wrote:> i hope some answers your problem too..i''ve got the same issue....and i > keep getting a multiparamete assignment error...dave > > On Oct 7, 1:43 pm, Will Monk <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > >> Hi, >> >> I am using date_select for when a post is being submitted. This is the >> tag i use in my view, >> >> <%= date_select("post", "date", :order => [:month, :day])%> >> >> However this outputs >> >> <select id="post_date_2i" name="post[date(2i)]"> >> >> this is probably the way its meant to be, but i cant get it to submit it >> to the db colum, date. >> Is there a way of getting it to output >> >> <select id="post_date" name="post[date]">? >> >> Thanks Will >> -- >> Posted viahttp://www.ruby-forum.com/. >> > > > > >-- Sincerely, William Pratt --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---