aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model.rb
diff options
context:
space:
mode:
authorChristian Blais <christ.blais@gmail.com>2016-05-03 14:37:11 -0400
committerChristian Blais <christ.blais@gmail.com>2016-05-03 14:46:49 -0400
commit17141481d99f1ae6d229cd5330b249f101abd116 (patch)
treee4b0b1b7f82e5a6969ecd630b42e8146916bf9f3 /activemodel/lib/active_model.rb
parentac8d0d76cb72bd0542405cfb73552a699f2bc0ef (diff)
downloadrails-17141481d99f1ae6d229cd5330b249f101abd116.tar.gz
rails-17141481d99f1ae6d229cd5330b249f101abd116.tar.bz2
rails-17141481d99f1ae6d229cd5330b249f101abd116.zip
Change RangeError to a more specific ActiveModel::RangeError
The should make it easier for apps to rescue ActiveModel specific errors without the need to wrap all method calls with a generic rescue RangeError.
Diffstat (limited to 'activemodel/lib/active_model.rb')
-rw-r--r--activemodel/lib/active_model.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activemodel/lib/active_model.rb b/activemodel/lib/active_model.rb
index b95c174d6e..7de259a60d 100644
--- a/activemodel/lib/active_model.rb
+++ b/activemodel/lib/active_model.rb
@@ -49,6 +49,7 @@ module ActiveModel
eager_autoload do
autoload :Errors
+ autoload :RangeError, 'active_model/errors'
autoload :StrictValidationFailed, 'active_model/errors'
autoload :UnknownAttributeError, 'active_model/errors'
end