On 02 Nov 2010, at 12:53, [email protected] wrote:

Why can I do this....

 validates_uniqueness_of "username", :case_sensitive=>false

.... but not this....

  User.where "Xx", :case_sensitive=>false

?

Validation happens through Ruby code, the case sensitivity for database queries is determined by your database (as far as I know, MySQL and MSSQL are case insensitive by default, PostgreSQL isn't).


Best regards

Peter De Berdt

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

Reply via email to