I''m no expert, but I would suggest using the datetime field type,
saving the date/time in full (Time.now), and then writing two methods
in your model that return the day of the week and the time formatted as
you wish.
On Nov 15, 1:15 pm, "Bradly"
<brad...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> I have a field that is going to hold a time. Since Rails "knows"
the
> MySQL type datetime, should I use that instead of the type "time"
and
> just leave the feild portions of datetime blank?
>
> Second Question:
> What I am really trying to do is save a day of the week and time in a
> field i.e. Sunday 7:00pm
> Right now I have a varchar holding the day of the week seperate from
> the time. Is this the best way to do this, yes?
>
> Thanks everyone for the help!
>
> -Bradly
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---