aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authorIrio Irineu Musskopf Junior <irio.musskopf@caixadeideias.com.br>2013-01-09 13:50:27 -0200
committerIrio Irineu Musskopf Junior <irio.musskopf@caixadeideias.com.br>2013-01-09 13:50:27 -0200
commitd4f46ee4fd666f458098b144c1451ce361948b35 (patch)
tree9d219c71304fd0e2ea416649993fac3bc2ca1f2d /activemodel
parent66c8740b98a988fe8959782ca1158a9dcce6b4c6 (diff)
downloadrails-d4f46ee4fd666f458098b144c1451ce361948b35.tar.gz
rails-d4f46ee4fd666f458098b144c1451ce361948b35.tar.bz2
rails-d4f46ee4fd666f458098b144c1451ce361948b35.zip
Set default value to ActiveModel::Validator initializer attribute
Makes it easier to test its objects.
Diffstat (limited to 'activemodel')
-rw-r--r--activemodel/lib/active_model/validator.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/validator.rb b/activemodel/lib/active_model/validator.rb
index d51f4d1936..f989b21140 100644
--- a/activemodel/lib/active_model/validator.rb
+++ b/activemodel/lib/active_model/validator.rb
@@ -103,7 +103,7 @@ module ActiveModel
end
# Accepts options that will be made available through the +options+ reader.
- def initialize(options)
+ def initialize(options = {})
@options = options.freeze
end