Set default value to ActiveModel::Validator initializer attribute

Makes it easier to test its objects.
This commit is contained in:
Irio Irineu Musskopf Junior 2013-01-09 13:50:27 -02:00
parent 66c8740b98
commit d4f46ee4fd
1 changed files with 1 additions and 1 deletions

View File

@ -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