aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/errors.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-05-03 18:50:51 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-05-03 18:50:51 -0300
commita278668624209b2421634d3dc6ee82b6e0353546 (patch)
tree89c38c7a611495ea4895ad90a692e3c99e22b74b /activerecord/lib/active_record/errors.rb
parentb6cc44bfa6b78f380503d3a4bc141bb529fd16bd (diff)
parentad5824bde0f63d5bb2e33b7fe86904d1fbd7ff95 (diff)
downloadrails-a278668624209b2421634d3dc6ee82b6e0353546.tar.gz
rails-a278668624209b2421634d3dc6ee82b6e0353546.tar.bz2
rails-a278668624209b2421634d3dc6ee82b6e0353546.zip
Merge pull request #17824 from yuki24/change-record-not-saved-and-not-destroyed-to-include-error-msg
AR::RecordNotSaved & RecordNotDestroyed from save!/destroy! should include an error message
Diffstat (limited to 'activerecord/lib/active_record/errors.rb')
-rw-r--r--activerecord/lib/active_record/errors.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/errors.rb b/activerecord/lib/active_record/errors.rb
index 98aee77557..0f1759abaa 100644
--- a/activerecord/lib/active_record/errors.rb
+++ b/activerecord/lib/active_record/errors.rb
@@ -71,9 +71,9 @@ module ActiveRecord
class RecordNotDestroyed < ActiveRecordError
attr_reader :record
- def initialize(record)
+ def initialize(message, record = nil)
@record = record
- super()
+ super(message)
end
end