In my model, birthday is of type Date. The following date_select field always displays the current day in the browser even though :birthday has a different value. Any idea? <%= date_select(:profile, :birthday) %> thanks, aj -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Nov 15, 2011, at 9:08 AM, AJ Chen wrote:> In my model, birthday is of type Date. The following date_select field > always displays the current day in the browser even though :birthday > has a different value. Any idea? > <%= date_select(:profile, :birthday) %>---- try to use variables instead of symbols... <%= date_select(''profile'', ''birthday'' %> none of the examples in the API show usage of symbols http://api.rubyonrails.org/classes/ActionView/Helpers/DateHelper.html#method-i-date_select Craig -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
thanks. that works. -aj On Nov 16, 12:45 pm, Craig White <craig.wh...-wmL3h9Ogt9DQT0dZR+AlfA@public.gmane.org> wrote:> On Nov 15, 2011, at 9:08 AM, AJ Chen wrote: > > > In my model, birthday is of type Date. The following date_select field > > always displays the current day in the browser even though :birthday > > has a different value. Any idea? > > <%= date_select(:profile, :birthday) %> > > ---- > try to use variables instead of symbols... > > <%= date_select(''profile'', ''birthday'' %> > > none of the examples in the API show usage of symbols > > http://api.rubyonrails.org/classes/ActionView/Helpers/DateHelper.html... > > Craig-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.