aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/type
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/type
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/type')
-rw-r--r--activemodel/lib/active_model/type/integer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/type/integer.rb b/activemodel/lib/active_model/type/integer.rb
index 2f73ede009..eea2280b22 100644
--- a/activemodel/lib/active_model/type/integer.rb
+++ b/activemodel/lib/active_model/type/integer.rb
@@ -46,7 +46,7 @@ module ActiveModel
def ensure_in_range(value)
unless range.cover?(value)
- raise RangeError, "#{value} is out of range for #{self.class} with limit #{_limit}"
+ raise ActiveModel::RangeError, "#{value} is out of range for #{self.class} with limit #{_limit}"
end
end