similar to: Why can I do a case insensitive Validation but not Find?

Displaying 20 results from an estimated 10000 matches similar to: "Why can I do a case insensitive Validation but not Find?"

2012 Oct 02
3
case insensitive inclusion validation
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: Core" group. To view this discussion on the web visit
2008 May 23
20
Rails validation is inefficient
Hi, I have a User model, with a validates_uniqueness_of :login The generated SQL for the validation is: SELECT * FROM `users` WHERE (LOWER(users.login) = ''fernando'' AND users.id <> 10001) LIMIT 1; and it takes 0.13s to happen (my table has 10.000 rows) When I use the EXPLAIN instruction on it, it shows that it will use the primary_key as index, but this is not
2006 Apr 20
7
Rails + postgres case insensitive searches.
Hello all I am wondering how rails handles case sensitivity in databases. If I do a Person.find_all_by_name("tim") in mysql I would expect to get tim, TIm, and Tim. Do I only get tim in postgres? How do other people deal with this? Do you resort to find_by_sql for all your postgres queries to get case insensitive results?
2017 Sep 05
4
login case sensitivity
hello, some users' login fails since they type upper case for their user ids ,etc ... how can case sensitivity be disabled so they can login with mix of upper and lower case? this is what i tried: in /etc/sssd/sssd.conf i tested this below [domain/default] case_sensitive = false i stopped sssd, deleted all inside /var/sss/db and started sssd but that did not help .... thank you,
2008 Aug 21
1
validates_uniqueness_of not working - urgent
I''m using restful_authentication to let users register and login. Lately, however, I''m seeing multiple login and emails being created even though I have validates_uniqueness_of as below: user.rb validates_uniqueness_of :login, :email, :case_sensitive => false mysql> select id, login, email, created_at, state from users;
2006 Mar 10
5
case insensitive search
I am having trouble with a simple gallery search. I type in a segment of the address and i only seem to be getting results if I use the correct case. This is in my Gallery controller: def search @gallery = Gallery.find(:all, :include => :property, :conditions => "address LIKE ''%#{@params[:keywords]}%''") end On a different note: I am having
2020 Sep 08
3
ssh: case insensitive fingerprint validation
Hello! I noticed the ssh client now allows you to paste a fingerprint at the host key verification question which I thought was pretty cool and a welcome feature. When testing it out I discovered it did not care about the case of the entered hash, and looking at sshconnect.c I see strcasecmp() is used which explains why. I'm just curious if this was a deliberate decision or if it would make
2009 Mar 23
5
Rspec weird behaviour
Hi, I recently migrated from classic rails testing to Rspec, so I am pretty new to the framework and still learning. I am getting weird errors on an ActiveRecord model test, here is the basic class model definition: class Size < ActiveRecord::Base has_many :quantities, :dependent => :destroy validates_presence_of :name validates_uniqueness_of :name, :case_sensitive => false end
2006 Aug 14
3
case insensitive exclusion_of
I have the following validation code, however it will allow variations in case. Like ''Admin'' and ''admiN'', etc validates_exclusion_of :login, :in => %w( admin ), :message => "is reserved for system accounts" how can I make this validation case insensitive? -- Posted via http://www.ruby-forum.com/.
2008 Jun 06
1
Making sorting case insensitive
Hello, I''ve been trying to make sorting in ferret case insensitive without any luck. I''ve been searching the mailing list, the docs and nothing. Apparently setting the type option for the sort to string should do it, but it doesn''t. Does anyone know how to achieve this? Thanks. -- Efr?n D?az http://www.efrendiaz.com
2007 Jul 30
3
validates_uniqueness_of doesn't work if value tested is numeric and column is string
Hello all, I am working through the depot example in the rails book. If I add a validates_uniqueness_of to a string column in the model, and then try to create a record with a number in this string column I get an SQL error. Looks like the SQL generated to test for uniqueness does not quote the value if it''s numeric even though it''s comparing against a varchar column. It does
2006 Feb 07
2
validates_uniqueness_of case Sensitive
Is there a option to make validates_uniqueness_of Case Sensitive, if so what is it, if not then how to do it without writing my own function. Regards Suraj
2018 Jul 25
1
[PATCH] v2v: rhv plugin - case-sensitive search queries
Changed both search queries to case-sensitive (to ensure an exact match). --- v2v/rhv-upload-plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py index c6ba1962f..d787c9598 100644 --- a/v2v/rhv-upload-plugin.py +++ b/v2v/rhv-upload-plugin.py @@ -71,7 +71,7 @@ def find_host(connection): storage_name =
2006 May 18
1
validates_uniqueness_of
I used validates_uniqueness_of it is case insensitive, it takes only admin not Admin. So please help me out how to put validates_uniqueness_of as case sensitive Thanks in Advance Surekha.Matte -- Posted via http://www.ruby-forum.com/.
2012 Dec 04
2
[Rails 3.2] validation on create not working
class Place < ActiveRecord::Base validates :description, :presence => true validates :description, :uniqueness => {:case_sensitive => true, :on => :create } # also tried # validates :description, :uniqueness => {:case_sensitive => true }, :on => :create On update ( in form fields, updated label, same description ) params
2007 Dec 27
0
Silent Validation Failures
Hello, I''m having trouble with after_validation_on_create causing my validations to fail silently. I''ve got a restful_authentication based user model that requires a number of things from the user: email, dob, gender, etc. When a user is created, all of these are validated in various ways (presence, inclusion_of, etc.). Afterwards, I call three protected methods using
2006 Nov 29
2
validates_uniqueness w scope
In a one-to-many relationship (domain has_many :categories and category belongs_to :domain) In the category model I use: validates_uniqueness_of :name, :case_sensitive => false but upon creation of a category this validation is performed on ALL domains, can I restrict it only to the categories of the current domain, the to which teh category being saved belongs_to ? if yes ? how ? thanks
2014 Mar 02
2
Using ZFS Case insensitive filesystems with Samba
>> Here's something I learned when working with the FreeNAS folks : >> ZFS can be configured to be case insensitive when >> you create the filesystem (NOTE - cannot be altered >> *after* the filesystem is created). >> zfs create -o casesensitivity=insensitive filesystem In this case, will ZFS preserve capitals in file and directory names if they are so created
2011 Feb 10
4
DO NOT REPLY [Bug 7951] New: Option for case insensitivity in filter rules
https://bugzilla.samba.org/show_bug.cgi?id=7951 Summary: Option for case insensitivity in filter rules Product: rsync Version: 3.0.6 Platform: All URL: http://lists.samba.org/archive/rsync/2007- March/017381.html OS/Version: All Status: NEW Severity: normal Priority: P3
2007 Jun 20
2
[PATCH] Case insensitive matching for the regex plugin
Hi, I have created an addition to the regex plugin that allows case insensitive matching for title/class/name/role. To enable the case insentive matching, I chose to prepend an 'i' before the tag (ititle=, iclass=, ...). The patch is obviously attached ;-) Are there any objections against putting this code in? Regards, Danny -------------- next part -------------- A non-text attachment