controlling format for time duration field?

24 views
Skip to first unread message

Adam Spiers

unread,
Jan 13, 2012, 10:15:24 AM1/13/12
to actives...@googlegroups.com
Hi all,

I have a 'duration' field in one of my models representing a time duration. The MySQL column type is TIME; however when editing via the #edit action, ActiveScaffold shows it in this format:

  0000-00-00 04:00:00

How can I make it more human readable? I couldn't find anything relating to time fields in the ActiveScaffold wiki.

Ideally it would also have friendlier widget for changing the duration (e.g. a JQueryUI slider snapping to 30 minute increments)

Thanks,
Adam

Sergio Cambra

unread,
Jan 16, 2012, 4:43:10 AM1/16/12
to actives...@googlegroups.com

You will have to create a form override, or form_ui helper method.

If you submit it I could add it to ActiveScaffold

Reply all
Reply to author
Forward
0 new messages