similar to: :case_sensitive => false not working with postgresql

Displaying 20 results from an estimated 10000 matches similar to: ":case_sensitive => false not working with postgresql"

2010 Nov 02
2
Why can I do a case insensitive Validation but not Find?
Why can I do this.... validates_uniqueness_of "username", :case_sensitive=>false .... but not this.... User.where "Xx", :case_sensitive=>false ? -- 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
2012 Jun 06
3
how to do a Model.order(:name) using a :case_sensitive => false ?
this option is available in validation.. is there any equivalent when doing a query or should it be SQL dependent ( coded in the model ) ? thanks for feedback -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe
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
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 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
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/.
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
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
2017 Sep 07
0
login case sensitivity
On 5 September 2017 at 17:27, FHDATA <fhdata at unm.edu> wrote: > > > 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 > >
2007 Apr 03
0
[942] trunk/wxsugar/lib/wx_sugar/wx_classes/listctrl.rb: Implement find_string method cognate with ControlWithItems
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!-- #msg dl { border: 1px #006 solid; background: #369; padding:
2012 Jun 06
1
Default value for case sensitive on uniqueness validator
Hello, The uniqueness validator was always case sensitive but that seems wrong because we want uniqueness validations to be insensitive in most of the time. Do not make more sense be insensitive by default and set sensitive only where it should be? We are migrating a lot of big applications from mysql to postgresql here and we are setting case sensitive to false on **all** uniqueness
2009 Jun 17
2
validates_uniqueness_of fails on STI in Rails 2.3.2
I''ve got something like this: class Position < ActiveRecord::Base end class CartItem < Position validates_uniqueness_of :product_id end When I try to save CartItem I get this error: ArgumentError: wrong number of arguments (1 for 2) from /home/joaz/.gem/ruby/1.8/gems/activerecord-2.3.2/lib/active_record/validations.rb:758:in `exists?'' from
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 Aug 01
0
Help with Access Control
Hi, I am following the excellent tutorial http://www.railsforum.com/viewtopic.php?id=14216 (post 5) on how to implement an access control feature i.e. only a friend is allowed to view a profile of a particular member. I am not using the restful authentication plugin as the author is using to implement the authentication feature (post 1) in the tutorial. All I am interested in is the post 5
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 May 10
4
validates_uniqueness_of and create atomicity
Hi folks, I have a question regarding validates_uniqueness_of, and similar before-filter-like events attempting to guarantee some DB state prior to modification. >From my reading of ActiveRecord, validate_uniqueness_of appears to cause a SELECT on the underlying table attempting to ensure that a record with ID(s) specified in the validates_uniqueness_of statement is not already present, prior
2007 Apr 20
0
Rails validations, how to improve them
Here is a discussion of a problem and potential solution for Rails validations. Rails has a fundamental problem with validations in that it essentially requires you to either 1. Accept the default error messages (which can often lead to ugly and unfriendly messages for the user) 2. Override validation messages at the model level like so validates_uniqueness_of :field, :message =>
2006 Apr 28
2
validates* gives me problems
Hi, In Debian/testing (mysql-5.0.20, ruby1.8, rails 1.1.0) Im trying to follow up the fourdaysonrails tutorial, and when putting: validates_uniqueness_of :category, :message => "Already exists" in /myapplication/app/model/category.rb I get: NoMethodError in Categories#create undefined method `category'' for #<Article:0x407f6418> RAILS_ROOT:
2008 Mar 18
0
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)
2006 Apr 14
1
Validating Existing Models
I''ve got a user object which has quite a few attributes mapped to the database. As of right now I''ve got some validations in the model like: validates_presence_of :password, :message => "You must specify a valid password." validates_confirmation_of :password, :message => "Password doesn''t match the confirmation." validates_presence_of