Google Groups Home
Help | Sign in
Case sensitive validate_uniqueness_of isn't working
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Emilio Tagua  
View profile
 More options Mar 18, 12:30 pm
From: "Emilio Tagua" <milo...@gmail.com>
Date: Tue, 18 Mar 2008 16:30:24 +0000
Local: Tues, Mar 18 2008 12:30 pm
Subject: Case sensitive validate_uniqueness_of isn't working
Hi,

validate_uniqueness_of has the option :case_sensitive, this option is
true by default, there are tests to check that :case_sensitive =>
false is working, but there isn't any test to check that, when set to
true (the default!), is working, in fact it doesn't work at.

There isn't a database agnostic way to do a case sensitive search,
there is in myql (binary like) and sqlite (is case sensitive), but not
a general solution.

I did this patch that add the test to check that case sensitivity is
working and get it to work by doing a ruby (case sensitive) comparison
if case sensitive option is given. To achieve this i changed the find
for a select_all with a construct_finder_sql, so in case it must
compare the value the results aren't objects to be initialitated.

You can find the ticket/patch here:

http://dev.rubyonrails.org/ticket/11366

Thank you.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google