Re: Re: How to create a custom time select form element?

Dheeraj Kumar
Sun, 14 Aug 2011 07:14:08 -0000

I highly recommend using jQueryUI Datepicker for more usable date selection.
However, if you want to have it your way, create fields in your model for
all the select boxes, and use the before_save callback to construct the
final date field for storing in the database.

Refer http://guides.rubyonrails.org/form_helpers.html#barebones-helpers

On Sun, Aug 14, 2011 at 12:12 PM, Andrew
<misbehavens-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> I could easily write the HTML to create a few select elements, however,
> it''s the Ruby part that I am not as familiar with. Could you
provide an
> example of what the controller code (or model, helper, etc) would look like
> to convert the 3 fields into a valid time value ready to store in a
> database?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/rubyonrails-talk/-/eYuCw14obR4J.
> 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.
>
>