Last night a friend of mine started ranting about validates_presence_of
:boolean_field returning not valid when the boolean field is false.

I checked the rails issues and this seems to be a pretty common concern
about the naming of  'presence' .

Instead of changing the behaviour of the presence validator, I was
wondering if maybe the answer to avoid such misconceptions could be to
create a new validator called presence_of_boolean that abstracts the
sometimes called "hacky" validates_inclusion in: [true, false]

What do you guys think?

Sergio Campamá

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-core+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-core@googlegroups.com.
Visit this group at http://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to