Top "Validates-uniqueness-of" questions

validates_uniqueness_of is a rails helper method for determining whether an attribute is unique throughout a system

validates_uniqueness_of passes on nil or blank (without allow_nil and allow_blank)

The uniqueness validator of ActiveRecord has an options to skip validation if the value is nil or blank. Even if …

ruby-on-rails activerecord validates-uniqueness-of
Rails validate uniqueness only if conditional

I have a Question class: class Question < ActiveRecord::Base attr_accessible :user_id, :created_on validates_uniqueness_of :created_…

ruby-on-rails validates-uniqueness-of
Rails 3: Validate combined values

In Rails 2.x you can use validations to make sure you have a unique combined value like this: validates_uniqueness_…

ruby-on-rails ruby-on-rails-3 validation validates-uniqueness-of database-integrity
Rails uniqueness constraint and matching db unique index for null column

I have the following in my migration file def self.up create_table :payment_agreements do |t| t.boolean :automatic, :…

ruby-on-rails migration unique-index validates-uniqueness-of
Rails - Validate Nested Attributes Uniqueness with scope parent of parent

I have a problem with the scoped uniqueness validation in Rails for nested attributes with a parent of parent. Background …

ruby-on-rails scope nested-attributes validates-uniqueness-of
Hibernate - a different object with the same identifier value was already associated with the session

Possible Duplicate: Spring + Hibernate : a different object with the same identifier value was already associated with the session After changing …

hibernate spring annotations entity validates-uniqueness-of
Rails validates_uniqueness_of across multiple columns with case insensitivity

I have a model that has two fields, which I will call first_name and last_name, and I want …

ruby-on-rails scope case-insensitive validates-uniqueness-of