aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/validations/length.rb
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2009-03-20 21:40:37 +0000
committerPratik Naik <pratiknaik@gmail.com>2009-03-20 21:45:13 +0000
commit08a99d0eac9370b590220953283475e00e3183e6 (patch)
treee1b32a221fe5e4b0e639ff74f5c099af32da29e6 /activemodel/lib/active_model/validations/length.rb
parentcc5e019f6bc48663fe75a00e68293c0645998d14 (diff)
downloadrails-08a99d0eac9370b590220953283475e00e3183e6.tar.gz
rails-08a99d0eac9370b590220953283475e00e3183e6.tar.bz2
rails-08a99d0eac9370b590220953283475e00e3183e6.zip
Add I18n translations to ActiveModel and move more AR specific parts to ActiveRecord::Validations
Diffstat (limited to 'activemodel/lib/active_model/validations/length.rb')
-rw-r--r--activemodel/lib/active_model/validations/length.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/activemodel/lib/active_model/validations/length.rb b/activemodel/lib/active_model/validations/length.rb
index f6bb1f6d70..9736595990 100644
--- a/activemodel/lib/active_model/validations/length.rb
+++ b/activemodel/lib/active_model/validations/length.rb
@@ -48,12 +48,12 @@ module ActiveModel
# Ensure that one and only one range option is specified.
range_options = ALL_RANGE_OPTIONS & options.keys
case range_options.size
- when 0
- raise ArgumentError, 'Range unspecified. Specify the :within, :maximum, :minimum, or :is option.'
- when 1
- # Valid number of options; do nothing.
- else
- raise ArgumentError, 'Too many range options specified. Choose only one.'
+ when 0
+ raise ArgumentError, 'Range unspecified. Specify the :within, :maximum, :minimum, or :is option.'
+ when 1
+ # Valid number of options; do nothing.
+ else
+ raise ArgumentError, 'Too many range options specified. Choose only one.'
end
# Get range option and value.