Make "property :foo, :default => false" work
Before a default value of false was treated like a default of nil, which is not the same. Signed-off-by: Matt Aimonetti <mattaimonetti@gmail.com>
This commit is contained in:
parent
75a5018b12
commit
f7bbee8243
3 changed files with 9 additions and 3 deletions
|
@ -30,11 +30,11 @@ module CouchRest
|
|||
@validation_format = options.delete(:format) if options[:format]
|
||||
@read_only = options.delete(:read_only) if options[:read_only]
|
||||
@alias = options.delete(:alias) if options[:alias]
|
||||
@default = options.delete(:default) if options[:default]
|
||||
@default = options.delete(:default) unless options[:default].nil?
|
||||
@casted = options[:casted] ? true : false
|
||||
@init_method = options[:send] ? options.delete(:send) : 'new'
|
||||
@options = options
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue