Changeset 9248
- Timestamp:
- 04/10/08 18:06:05 (3 months ago)
- Files:
-
- trunk/activerecord/CHANGELOG (modified) (1 diff)
- trunk/activerecord/lib/active_record/validations.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activerecord/CHANGELOG
r9247 r9248 1 1 *SVN* 2 3 * Change validates_uniqueness_of :case_sensitive option default back to true (from [9160]). Love your database columns, don't LOWER them. [rick] 2 4 3 5 * Ensure that save on child object fails for invalid belongs_to association. Closes #11555. [rubyruy] trunk/activerecord/lib/active_record/validations.rb
r9226 r9248 604 604 # * <tt>message</tt> - Specifies a custom error message (default is: "has already been taken") 605 605 # * <tt>scope</tt> - One or more columns by which to limit the scope of the uniqueness constraint. 606 # * <tt>case_sensitive</tt> - Looks for an exact match. Ignored by non-text columns ( false by default).606 # * <tt>case_sensitive</tt> - Looks for an exact match. Ignored by non-text columns (true by default). 607 607 # * <tt>allow_nil</tt> - If set to true, skips this validation if the attribute is null (default is: false) 608 608 # * <tt>allow_blank</tt> - If set to true, skips this validation if the attribute is blank (default is: false) … … 614 614 # method, proc or string should return or evaluate to a true or false value. 615 615 def validates_uniqueness_of(*attr_names) 616 configuration = { :message => ActiveRecord::Errors.default_error_messages[:taken] }616 configuration = { :message => ActiveRecord::Errors.default_error_messages[:taken], :case_sensitive => true } 617 617 configuration.update(attr_names.extract_options!) 618 618