Re: [Rails-core] case insensitive inclusion validation

2012-10-02 Thread dburry
There's also the little issue of the world not all using only English. A full Unicode-aware case insensitivity is even more inefficient than a regular ascii-only one... but in practice might be required in just as many cases as an ascii one... Dave On Tuesday, October 2, 2012 12:15:25 PM UTC-

Re: [Rails-core] case insensitive inclusion validation

2012-10-02 Thread Godfrey Chan
Is there a use case where you wouldn't just do something like... validates :numbers, inclusion: { in: ['one', 'two'] } def numbers read_attribute(:numbers).try(:downcase) end i.e. Is there a particular reason why you still want the values to be stored/presented with potentially different case

[Rails-core] case insensitive inclusion validation

2012-10-02 Thread Matt Huggins
I'm not voting for or against it, but if this does become a feature, the option name should probably be :case_insensitive so as to match the uniqueness validation option. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To view this disc

[Rails-core] case insensitive inclusion validation

2012-10-02 Thread Nihad Abbasov
I want to add case_sensitive option to inclusion validation. This will allow to do: validates :numbers, :inclusion => { :in => %(One Two), :case_sensitive => false } Does it make a sense? Thanks. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: C