similar to: validates_uniqueness_of does not work for non-latin characters

Displaying 20 results from an estimated 50000 matches similar to: "validates_uniqueness_of does not work for non-latin characters"

2007 Nov 08
1
validates_uniqueness_of with conditions
Hello I have a user table in my db. A user has a status field, status is an INT an can be between 1-5. When a new user sign up I want to use "validates_uniqueness_of :login" in user model. But I don''t want to validate the new user against users with status == 5. Can I do this with some :if or :conditions? (I prefer not to use my own validate method) -- Posted via
2006 Jan 27
1
Search generator and non-latin characters
I installed search generator and it works nice with latin characters in query, but when I use cyrillic it just shows all entities from table. I suppose it shows all the table when nothing appropriate found also. So the question is how to tune it for cyrillic for example and how to ? Thanks, Mikhail
2006 Mar 06
0
File/folder with non-Latin characters
Hi all, We have a corporate LAN, with users working in Windows XP Pro. I have implemented a Linux backup solution, which uses Samba to mount Windows shares, and copies files to backup directories, which are shared using Samba, so that I can grab backed up copies of files from a Windows client using the Samba share. I'm using Samba 3.0.14a on Ubuntu Breezy (using the 3.0.14a-6ubuntu
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 Dec 09
1
validates_uniqueness_of serialize
ActiveRecord bug ? validates_uniqueness_of doesn''t work with serialize I''m trying to serialize, unserialize an Array-type property of a Object instance, and validate that the Array or serialized version is unique within the the scope of another property using :scope does anyone know a work around ? Anthony Green -- Posted via http://www.ruby-forum.com/.
2006 Sep 11
0
validates_uniqueness_of :number by the year in a DateTime column
Hello all, I have a class Ticket < ActiveRecord::Base which has a property called :number and a property called :samples_date. a ticket number has to be unique over the same year. the year is given by the property called :samples_date I''m trying to validate the uniqueness of :number based on the year from the :samples_date property. i would like to specify the condition somehow in
2008 Sep 19
0
validates_uniqueness_of: passing a method to :scope
I was wondering if anybody knows an easy way to pass a method name as the scope option to a validates_uniqueness_of validation on a AR model? For example, I have nested models a bit like: class Survey has_many :areas end class Area belongs_to :survey has_many :questions, :order => ''position'' validates_uniqueness_of :position, :scope => : survey_id end class
2007 May 06
1
validates_uniqueness_of (with :scope) doesn't seem to work?
I have a master record called ''project'' and a child record called ''agycode''. Obviously, agycode has a project_id FK. I wish to make the "descr" field unique ONLY within the ''project_id'' ''scope''. Here are the key pieces of information Agycode fields (id, project_id, descr) Here''s the declaration in the
2006 Dec 06
2
validates_uniqueness_of where scope euqals created_by "magic" field
I have the following ActiveRecord objects: class Recipe < ActiveRecord::Base has_many :ratings, :dependent => true . . . end class Rating < ActiveRecord::Base validates_uniqueness_of :created_by, :scope => :recipe_id belongs_to :recipe, :counter_cache => true . . . end The created_by field on Rating is implemented as a "magic" field similar to this:
2007 Apr 08
10
Ferret and non latin characters support
I''ve successfully installed ferret and acts_as_ferret and have no problem with utf-8 for accented characters. It returns correct results fot e.g. fran?ais. My problem is with non latin characters (Persian indeed). I have tested different locales with no success both on Debian and Mac. Any idea? (ferret 0.11.4, acts_as_ferret 0.4.0, rails 1.1.6) -- Posted via http://www.ruby-forum.com/.
2008 Jan 26
1
validates_uniqueness_of customization
Hey, I have a simple web app where I would like users to sign up with a maximum of two accounts per email address. What would be the rails way of accomplishing this. Is there anyway of modifying validates_uniqueness_of to perform the proper validations? Thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because 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;
2010 Aug 28
1
validates_uniqueness_of missing in rails 3.0 rc2?
Has anybody noticed validates_uniqueness_of missing in rails 3.0 rc2? I''m not sure if this is a bug or I''m just doing something wrong. Here''s what I''m doing. Class 1: class Title < ActiveRecord::Base validates_length_of :language, :is => 3 validates_uniqueness_of :language, :scope => :book_id validate :language,
2006 May 10
1
Validates_uniqueness_of multiple field combo?
Hello, I am new to Ruby on rails and this is therefore probably trivial. Lets say I have 3 tables - users[id,name, age, ...], interests[id,name,description, ...], and finally a table user_interests[id,user_id,interest_id] to link a user to a set of interests. Now there is no problem to put validates_uniqueness_of :name in the user-model to ensure that I only have one Lenny, but how do I
2006 Mar 02
4
Getting Acts_as_Paranoid to work with validates_uniqueness_of
Hello I''ve been using Acts_as_Parnoid for a while and it has been working well but I am now having a slight issue with it. I have a company table were I would like to use validates_uniqueness_of :company_name. This validation works if a company exists in the database and has not been deleted. However, I also would like the validates_uniqueness_of to work if a company has
2007 Nov 18
1
validates_uniqueness_of question
Given three models: a design model, a votes model, and a users model the problem is a user can only vote for a design once. If I do a validates_uniqueness_of :user in the votes model that means a user can only vote once, period. What I want is to say a user can only vote for a single design once. Anyone know the best way to do this? Thanks. JB
2007 May 28
2
out-cheat validates_uniqueness_of
before_save :strip_strings validates_uniqueness_of :username validates_presence_of :username private def strip_strings self.username = username.gsub!(" ","") end example: username = " gissmoh-/upiLifMog2ELgA04lAiVw@public.gmane.org " becomes gissmoh-/upiLifMog2ELgA04lAiVw@public.gmane.org and is stored in the
2008 Sep 02
2
validates_uniqueness_of in update
I have a problem with the usage of validates_uniqueness_of that I hope someone can help throw a light on. With a new record, this validation works fine. But my problem came when I am updating a record. I was not able do it because it tells me that field value already exists. I was actually updating the value of other fields. According to the documentation which says "When the record is
2009 Jun 05
1
Mixed Latin, Greek and subscript characters in axis label
Dear R-helpers, I have been trying to figure out how to plot a graph with an axis label consisting of a mixture of Latin, Greek and subscript characters. Specifically, I need to write A[beta]{1-42}, where A is Latin script A, [beta] is Greek lower case beta and {1-42} is subscript '1-42'. I can use xlab=expression(beta[1-42]) and obtain the [beta]{1-42} part of the label. But, I can't
2009 Jun 26
0
validates_uniqueness_of and MySQL enum type
I tried to check validates_uniqueness_of for a MySql enum type column with a scope given, like this: validates_uniqueness_of :phone_type, :scope => :user_id And It didn''t work. When I check the SQL statement for doing this validation, it is like this: SELECT `phone_numbers`.id FROM `phone_numbers` WHERE (`phone_numbers`.`phone_type` = BINARY '''' AND