Hi, Being new to RoR, I have had difficulty finding information regarding date formats for active scaffold. I have a DATE field on the create form of one of my controllers. For this specific controller, I would like to capture the year only (i.e. %Y). I have already created a helper to display the %Y date on the view, but I cannot figure out how to do a similar change to the form to only request the user for the year. Any thoughts on how this can be done? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
David wrote:> Hi, > > Being new to RoR, I have had difficulty finding information regarding > date formats for active scaffold. I have a DATE field on the create > form of one of my controllers. For this specific controller, I would > like to capture the year only (i.e. %Y). I have already created a > helper to display the %Y date on the view, but I cannot figure out how > to do a similar change to the form to only request the user for the > year. > > Any thoughts on how this can be done?You have to customize the field either in helper or in view. That is also called form/field overrides. See http://activescaffold.com/docs/form-overrides and http://activescaffold.com/docs/field-overrides for help. -- 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 -~----------~----~----~----~------~----~------~--~---