ok. thanks. On Thu, Jan 3, 2013 at 7:24 PM, tamouse mailing lists < [email protected]> wrote:
> On Thu, Jan 3, 2013 at 2:06 AM, weimar <[email protected]> wrote: > > If i was going to put the date into the correct format, would i do it > within > > the controller or the model? > > If you consider that a valid form of date (which it is), then doing > the manipulation to make it work in the model should go in the model, > notably using a before_save hook. > > OTOH, if you accept any sort of string in that field, you will > probably need to validate it's contents before passing it off to the > model, and that should go in the controller. > > OTOOH, put it where it makes the most sense to you. > > -- > 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 [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

