similar to: validates_uniqueness_of across multiple rows?

Displaying 20 results from an estimated 2000 matches similar to: "validates_uniqueness_of across multiple rows?"

2010 Feb 22
3
Multidimensional dynamic Hash
OK I give up, how do I do this... I have a DB that stores dynamic variables with I group into group_id''s. For instance here are a couple examples of db rows: title="name", description = "john", grouping_id = "1" title="location", description = "USA", grouping_id = "1" title="comment", description = "hello",
2010 Nov 15
2
Null values in R
Hi R-helpers , can you please let me know the methods in which NULL values can be handled in R? Are there any generic commands/functions that can be given in a workspace,so that the NULL values occuring in that workspace (for any datasets that are loaded , any output that is calculated) , are considered in the same way? Thanks in advance. -- View this message in context:
2011 Jan 07
3
R packages for R 2.11.1
Hi , I am using R 2.11.1 . I need to download few packages for the same for Windows.But in CRAN i see the latest packages for R 2.12.1 only. Can you help me out with the locations where i can find the packages for R 2.11.1 Windows zip? Thanks in advance -- View this message in context: http://r.789695.n4.nabble.com/R-packages-for-R-2-11-1-tp3178633p3178633.html Sent from the R help mailing
2012 Nov 06
2
Column names containing ` in R
Hi, My data has column names which has ` character. For example , *> names(dataframe) [1] "`region" "farmsize`" "farmincome" "maincrop" "claimvalue"* If i use these objects in my function, the following error is thrown. *lmm<-lm(``region`~farmincome) Error: attempt to use zero-length variable name* Is there a way, say an escape
2012 May 28
1
rpart space in column names
Hi, Our data has column names with spaces in that.The names in dataFrame are, *[1] "Sepal Length" "Sepal Width" "Petal Length" "Petal Width" "Species" * When i try to use the column names in rpart function, it gives the following error. * rp<-rpart(as.factor(`Species`)~`Sepal Length`) Error in `[.data.frame`(frame, predictors) :
2011 Dec 21
1
Reg : Using RJDBC to read UTF-8 characterrs
Hi All, We are using the following dataset which contains UTF-8 characters and is stored in a MySQL database. When we use RODBC and read the data, the characters are read correctly.But when we read using RJDBC ,the characters are read like ???????????????????????????1 Can you please let me know how we can read the UTF-8 characters as it is done by RODBC. ID code Outlook Temperature Humidity
2011 Apr 06
2
Help in kmeans
Hi All, I was using the following command for performing kmeans for Iris dataset. Kmeans_model<-kmeans(dataFrame[,c(1,2,3,4)],centers=3) This was giving proper results for me. But, in my application we generate the R commands dynamically and there was a requirement that the column names will be sent instead of column indices to the R commands.Hence, to incorporate this, i tried using the R
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/.
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
2006 Apr 27
4
customize validates_uniqueness_of
I need to modify the validates_uniqueness_of function so that it will check that the string is unique but only in its own category. For example right now I have validates_uniqueness_of :title so let''s say I have the :title "Title 1" already in the database with the :category of "1" then if i wanted to enter the :title "Title 1" in the database again BUT
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 Aug 10
2
validates_uniqueness_of problem
hi Could I check to strings for uniqueness together and not individually? That means for me in an example: name: sex: result: ----- ---- ------- miller m unique miller f unique jackson m unique miller m isn''t unique So I want to check the name and sex be together unique. The name isn''t
2006 Jun 07
3
validates_uniqueness_of two fields
Is it possible to do a validates_uniqueness_of :name, :zip but only in that context? I''d like to be able to have that zip used again, but not in conjunction with a name already with that zip. Does that make sense? -- Posted via http://www.ruby-forum.com/.
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 Apr 05
2
validates_uniqueness_of with habtm
it''s a blog... class Entry < ActiveRecord::Base has_and_belongs_to_many :categories end similarly: class Category < ActiveRecord::Base has_and_belongs_to_many :entries end I wish to make sure that the owner doesn''t add the same category to a given entry more than once... I''m thinking that validates_uniqueness_of should be usable here. But 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
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
2009 Oct 02
0
Problems with validates_uniqueness_of
Hi to everybody, well i recently became a RoR developer, web i was following the video class from Lynda, and i introduce more code in my aplicacion, my application is a music store web site, ok so i add the funcionality of add clients, for that i need from my client, his user and password, so it will be 1 user per client, for that reason i use at my model validates_uniqueness_of :user
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
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,