List Info

Thread: time_zone_select helper enhancement




time_zone_select helper enhancement
user name
2007-12-21 14:44:34

As we all know it, Time Zones are a pain in the neck. Rails
make
things easier by providing some nice helpers. However, I
recently
faced a challenge when trying to pre select a time zone for
a user.
Using the time_zone_select helper, there's simply no way you
can pre
select a timezone for a user unless you already saved the
time zone in
his/her record. Creating a new user or editing a user with
an optional
timezone, becomes quite a challenge.

That's why I created this patch:

http://dev.ru
byonrails.org/ticket/10590

The patch adds support for a :default option allowing to
select a
default time zone if the user's time zone isn't set
already.

I also added updated the help with usage examples.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Ruby on Rails: Core" group.
To post to this group, send email to rubyonrails-coregooglegroups.com
To unsubscribe from this group, send email to
rubyonrails-core-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: time_zone_select helper enhancement
user name
2007-12-21 17:40:16
On 12/21/07, Matt Aimonetti <mattAimonettigmail.com> wrote:
> As we all know it, Time Zones are a pain in the neck.
Rails make
> things easier by providing some nice helpers. However,
I recently
> faced a challenge when trying to pre select a time zone
for a user.
> Using the time_zone_select helper, there's simply no
way you can pre
> select a timezone for a user unless you already saved
the time zone in
> his/her record. Creating a new user or editing a user
with an optional
> timezone, becomes quite a challenge.
>
> That's why I created this patch:
>
> http://dev.ru
byonrails.org/ticket/10590
>
> The patch adds support for a :default option allowing
to select a
> default time zone if the user's time zone isn't set
already.
>
> I also added updated the help with usage examples.

Nice patch; applied. Thanks Matt.

jeremy

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Ruby on Rails: Core" group.
To post to this group, send email to rubyonrails-coregooglegroups.com
To unsubscribe from this group, send email to
rubyonrails-core-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )