diff options
author | Robin Dupret <robin.dupret@gmail.com> | 2015-02-25 15:14:43 +0100 |
---|---|---|
committer | Robin Dupret <robin.dupret@gmail.com> | 2015-02-26 15:40:03 +0100 |
commit | 95c2fc967987e5dffa89a32c81bca736c7ba964d (patch) | |
tree | fb9607d98d956beb4037b2575de1b529f94107a9 /activerecord/lib/active_record/errors.rb | |
parent | 803ef74f9bbcbc71af12060157a996f7b65e24db (diff) | |
download | rails-95c2fc967987e5dffa89a32c81bca736c7ba964d.tar.gz rails-95c2fc967987e5dffa89a32c81bca736c7ba964d.tar.bz2 rails-95c2fc967987e5dffa89a32c81bca736c7ba964d.zip |
Follow-up to #10776
The name `ActiveModel::AttributeAssignment::UnknownAttributeError` is
too implementation specific so let's move the constant directly under
the ActiveModel namespace.
Also since this constant used to be under the ActiveRecord namespace, to
make the upgrade path easier, let's avoid raising the former constant
when we deal with this error on the Active Record side.
Diffstat (limited to 'activerecord/lib/active_record/errors.rb')
-rw-r--r-- | activerecord/lib/active_record/errors.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/errors.rb b/activerecord/lib/active_record/errors.rb index d710d96a9a..98aee77557 100644 --- a/activerecord/lib/active_record/errors.rb +++ b/activerecord/lib/active_record/errors.rb @@ -178,10 +178,8 @@ module ActiveRecord class DangerousAttributeError < ActiveRecordError end - UnknownAttributeError = ActiveSupport::Deprecation::DeprecatedConstantProxy.new( # :nodoc: - 'ActiveRecord::UnknownAttributeError', - 'ActiveModel::AttributeAssignment::UnknownAttributeError' - ) + # Raised when unknown attributes are supplied via mass assignment. + UnknownAttributeError = ActiveModel::UnknownAttributeError # Raised when an error occurred while doing a mass assignment to an attribute through the # +attributes=+ method. The exception has an +attribute+ property that is the name of the |