How do I get a time zone dropdown in the edit view?

122 views
Skip to first unread message

Justin Schier

unread,
May 24, 2013, 6:44:28 PM5/24/13
to rails...@googlegroups.com
I'm trying to have a select input for time zone in the edit screen in one of my models.

I know rails has a built-in time_zone_select form input helper, but how do I use it in rails_admin? I've searched the docs high and low and can't find anything. There's a reference to using partials, but I can't find examples of how to do that anywhere.

Can anyone help?

Thanks,
Justin

Benoit Bénézech

unread,
Jun 18, 2013, 5:35:56 AM6/18/13
to rails...@googlegroups.com
I would simply use enum.

You can pass a hash of options.

Otherwise you'll need to change the :partial option https://github.com/sferik/rails_admin/blob/master/lib/rails_admin/config/fields/types/string.rb#L36 to :cutom_smtg and create a partial at the right location (it will yell it).

Reply all
Reply to author
Forward
0 new messages