remove unneccessary return statements

this is how ruby style works... apparently
pull/2550/head
Jan Sandbrink 10 years ago
parent 5ba53b49b9
commit 3161b9ca7b
  1. 4
      app/models/custom_value/date_strategy.rb
  2. 4
      app/models/custom_value/float_strategy.rb
  3. 4
      app/models/custom_value/int_strategy.rb
  4. 2
      app/models/custom_value/list_strategy.rb
  5. 2
      app/models/custom_value/string_strategy.rb
  6. 2
      app/models/custom_value/user_strategy.rb
  7. 2
      app/models/custom_value/version_strategy.rb

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

@ -36,8 +36,8 @@ class CustomValue::FloatStrategy < CustomValue::FormatStrategy
def validate_type_of_value
Kernel.Float(value)
return nil
nil
rescue
return :not_a_number
:not_a_number
end
end

@ -36,8 +36,8 @@ class CustomValue::IntStrategy < CustomValue::FormatStrategy
def validate_type_of_value
Kernel.Integer(value)
return nil
nil
rescue
return :not_an_integer
:not_an_integer
end
end

@ -36,7 +36,7 @@ class CustomValue::ListStrategy < CustomValue::FormatStrategy
def validate_type_of_value
unless custom_field.possible_values.include?(value)
return :inclusion
:inclusion
end
end
end

@ -29,7 +29,7 @@
class CustomValue::StringStrategy < CustomValue::FormatStrategy
def typed_value
return value
value
end
def validate_type_of_value

@ -36,7 +36,7 @@ class CustomValue::UserStrategy < CustomValue::FormatStrategy
def validate_type_of_value
unless custom_field.possible_values(custom_value.customized).include?(value)
return :inclusion
:inclusion
end
end
end

@ -36,7 +36,7 @@ class CustomValue::VersionStrategy < CustomValue::FormatStrategy
def validate_type_of_value
unless custom_field.possible_values(custom_value.customized).include?(value)
return :inclusion
:inclusion
end
end
end

Loading…
Cancel
Save