attempt to merge wildchild/type_cast, still failing specs
This commit is contained in:
commit
15ea10eb9c
12 changed files with 652 additions and 150 deletions
|
@ -37,7 +37,7 @@ module CouchRest
|
|||
|
||||
def call(target)
|
||||
value = target.validation_property_value(field_name)
|
||||
property = target.validation_property(field_name)
|
||||
property = target.validation_property(field_name.to_s)
|
||||
return true if present?(value, property)
|
||||
|
||||
error_message = @options[:message] || default_error(property)
|
||||
|
@ -66,7 +66,7 @@ module CouchRest
|
|||
# Returns false for other property types.
|
||||
# Returns false for non-properties.
|
||||
def boolean_type?(property)
|
||||
property ? property.type == TrueClass : false
|
||||
property ? property.type == 'Boolean' : false
|
||||
end
|
||||
|
||||
end # class RequiredFieldValidator
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue