I’m quite new to rails and I think until now I didn’t get all of
So, here is what I want to do:
I have a form where a user can input a date. The logic behind the date
field should be a bit fancy and allow a special input short cuts:
- “” (blank field) => Date.today
- “25” => 25th of currnet month
- “23.3” => March, 23th in current year…
and so on (I guess you got the clue)
this is not a good way to do this.
Where can I hook this in in Rails?
For me this belongs into the modle class.
In my controller I have the following line:
@project_time = ProjectTime.new(params[:project_time])
The “date” is one of the params. So which method do I need to
implement/override to get the chance to
look at the date passed from the form ?
Thanks for your help