diff options
author | Tobias Lütke <tobias.luetke@gmail.com> | 2006-02-05 17:39:54 +0000 |
---|---|---|
committer | Tobias Lütke <tobias.luetke@gmail.com> | 2006-02-05 17:39:54 +0000 |
commit | 796295dba6839bf417c19a2f41fe2a32d968367a (patch) | |
tree | 7734d3934c5f2ab94213cb6d148d52d52b6ba328 /activerecord/lib/active_record | |
parent | 0633bb865bc755d4a67d6ade8ca588d2f3107b0f (diff) | |
download | rails-796295dba6839bf417c19a2f41fe2a32d968367a.tar.gz rails-796295dba6839bf417c19a2f41fe2a32d968367a.tar.bz2 rails-796295dba6839bf417c19a2f41fe2a32d968367a.zip |
ActiveRecord::RecordInvalid now states which validations failed in its default error message
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3544 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record')
-rwxr-xr-x | activerecord/lib/active_record/validations.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/validations.rb b/activerecord/lib/active_record/validations.rb index 3ba2f12ac1..7d1661449c 100755 --- a/activerecord/lib/active_record/validations.rb +++ b/activerecord/lib/active_record/validations.rb @@ -8,9 +8,9 @@ module ActiveRecord # end class RecordInvalid < ActiveRecordError attr_reader :record - def initialize(record, *args) + def initialize(record) @record = record - super(*args) + super("Validation failed: #{@record.errors.full_messages.join(", ")}") end end |