I'd argue for keeping it as UTC.
I'm not sure of the real percentage of users who would be confused by
UTC, but most careful usages use it in preference to GMT.
Positives of GMT
possibly slightly more familiar to English speakers.
Positives of UTC
it's the terminology used in most international laws about time and
time zones. (i.e. it's the standard)
Negatives of GMT
culturally English - those who were upset about giving preferences
to US timezones in selection helpers should also have an objection to
GMT vs. UTC.
It's actually now mostly used as the name for the timezone used
during the winter months in the UK rather than as the reference point
for time zones.
--
Rick DeNatale
My blog on Ruby
http://talklikeaduck.denhaven2.com/
Is this only the representation used in the time_zone_select helper?
Or does it affect the values that get persisted when you use it?
--
Cheers
Koz
I would keep the UTC format. to_s is for programmers, not for average users.
Alternatively you could allow for to_s(:gmt) if someone really wants it
in GMT.
Lawrence
ActiveModel readme says: "Totally experimental library".
Can someone please put this in a separate git branch until it has
matured enough, so that it doesn't pop up in documentation (and in my
search-through-code results ;-)
Thanks,
Lawrence
The defaults for validates_acceptance_of are: :on => :save, :allow_nil
=> true
The doc says you only have to add this to your model:
validates_acceptance_of :terms_of_service
and create a checkbox in your view and you're done. Not so. When you
don't check the checkbox the value is nil and no validation is
performed. Therefor, I had to do:
validates_acceptance_of :terms_of_service, :on => :create, :allow_nil
=> false
Are there actual use cases where someone would want this validates
method on :update ?
Should I create a patch where the defaults are modified to :on =>
:create, :allow_nil => false , or leave it as is ?
Regards,
Lawrence
The doc says you only have to add this to your model:
validates_acceptance_of :terms_of_service
and create a checkbox in your view and you're done. Not so. When you
don't check the checkbox the value is nil and no validation is
performed. Therefor, I had to do:
As far as I know this is only true if the checkbox is disabled. Disabled checkboxes pass no value, unchecked they send the value '0' (by default) and checked they send '1' (by default).
Agreed, we're in RC mode here so it's pretty much just bug fixes. We
can look into changing it after 2.1, but there are a variety of other
issues with checkboxes and browsers if you don't use the check_box
helper.
> wrote:
>>
>> On Thu, May 22, 2008 at 6:42 PM, Jack Danger Canty
>> <danger...@gmail.com> wrote:
>>>
>>> As far as I know this is only true if the checkbox is disabled. Disabled
>>> checkboxes pass no value, unchecked they send the value '0' (by default) and
>>> checked they send '1' (by default).
>>
>> Unchecked checkboxes don't send any value (per HTML spec).
>> http://www.w3.org/TR/html401/interact/forms.html#successful-controls
>>
>>
>>
>
>
> >
>
--
Cheers
Koz
Cheers
Koz