Hello
Our Database schema, and hence Our Model has a few datetime columns/
fields. But when entering new instances, We only want to present time
(i.e. HH:MM) in in our HTML views to the user. The time_select looks
useful, because it has an attractive minute_select: =>15, so the user
can enter 1/4 hours increments. The idea being that we would default
the Date part of Datetime attribute to Todays.date, prior to the Save
in our Model.
The problem is the default RAILS <%Forms %> to Active_record
constructs, presumes that all the Form Input fields are to map
directly onto the corresponding DateTime attributes in the model> This
results in calendar Day:Month:Year fields being presented, which is
excessive to the user. We cannot find anu obvious shortcut datetime =>
time RHTML mechanisms in the basic RAILS material. Do any exist ?
Without any time columns/fields in the database, and hence the model,
we cannot make use time_select in our rhtml views. So I guess the
only real option is that I go back to raw Form html, for this
particular reduced time field, name and extract explicitly in my
controller.
Is this a common problem ? and typical approach to adopt ?
Cheers
Jules