this is how ruby style works... apparently
@ -36,8 +36,8 @@ class CustomValue::DateStrategy < CustomValue::FormatStrategy
def validate_type_of_value
Date.iso8601(value)
return nil
nil
rescue
return :not_a_date
:not_a_date
end
@ -36,8 +36,8 @@ class CustomValue::FloatStrategy < CustomValue::FormatStrategy
Kernel.Float(value)
return :not_a_number
:not_a_number
@ -36,8 +36,8 @@ class CustomValue::IntStrategy < CustomValue::FormatStrategy
Kernel.Integer(value)
return :not_an_integer
:not_an_integer
@ -36,7 +36,7 @@ class CustomValue::ListStrategy < CustomValue::FormatStrategy
unless custom_field.possible_values.include?(value)
return :inclusion
:inclusion
@ -29,7 +29,7 @@
class CustomValue::StringStrategy < CustomValue::FormatStrategy
def typed_value
return value
value
@ -36,7 +36,7 @@ class CustomValue::UserStrategy < CustomValue::FormatStrategy
unless custom_field.possible_values(custom_value.customized).include?(value)
@ -36,7 +36,7 @@ class CustomValue::VersionStrategy < CustomValue::FormatStrategy