Changeset 4917
- Timestamp:
- 09/03/06 17:53:51 (2 years ago)
- Files:
-
- trunk/activerecord/CHANGELOG (modified) (1 diff)
- trunk/activerecord/lib/active_record/validations.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activerecord/CHANGELOG
r4909 r4917 1 1 *SVN* 2 3 * validates_confirmation_of only kicks in when the attribute, rather than its confirmation, is present. #785 [z@wzph.com] 2 4 3 5 * to_xml: the :methods option works on arrays of records. #5845 [Josh Starcher] trunk/activerecord/lib/active_record/validations.rb
r4482 r4917 334 334 335 335 validates_each(attr_names, configuration) do |record, attr_name, value| 336 record.errors.add(attr_name, configuration[:message]) unless record.send("#{attr_name}_confirmation").nil? or value == record.send("#{attr_name}_confirmation") 336 confirm = record.send("#{attr_name}_confirmation") 337 record.errors.add(attr_name, configuration[:message]) unless value.nil? || value == confirm 337 338 end 338 339 end