diff options
author | Irio Irineu Musskopf Junior <irio.musskopf@caixadeideias.com.br> | 2013-01-09 13:50:27 -0200 |
---|---|---|
committer | Irio Irineu Musskopf Junior <irio.musskopf@caixadeideias.com.br> | 2013-01-09 13:50:27 -0200 |
commit | d4f46ee4fd666f458098b144c1451ce361948b35 (patch) | |
tree | 9d219c71304fd0e2ea416649993fac3bc2ca1f2d | |
parent | 66c8740b98a988fe8959782ca1158a9dcce6b4c6 (diff) | |
download | rails-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.
-rw-r--r-- | activemodel/lib/active_model/validator.rb | 2 |
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 |