[Ruby] RoR coding questions / select_date

Mike Mondragon mikemondragon at gmail.com
Mon Jul 31 10:00:42 PDT 2006


Is ruby at zenspider.com the main list to discuss RoR coding questions (and yes
I've searched google and the RoR wiki already)?

Thanks
Mike

Noob question.
In case this is the right list, I created a controller that uses scaffold
and am going back and overrideing the update.rhtml view but want to use the
controller's default update method.  My model has a date field.  In my new
update.rthml, like scaffold, I use the ActionView::Helpers::DateHelper
select_date to display my model's date field.  Problem is I can't seem to
get the signature of the select_date correct; it seems like I need to use
the :prefix option, but when the post goes back to the controller the date
field is not correctly updated.

My noob mind thinks this should do it in update.rhtml
<%= select_date( @foo.date, :prefix => "foo[date]" ) %>
but it doesn't and makes me sad.

Bonus to you if you can show me what option to select_date will reorder the
html rendering of the date's selects from year/month/day to month/day/year.

Please correct me if I've used the wrong lingo in describing my problem.

Thanks again.


More information about the Ruby mailing list