diff options
author | Alex Kitchens <alexcameron98@gmail.com> | 2016-09-06 09:34:09 -0500 |
---|---|---|
committer | Alex Kitchens <alexcameron98@gmail.com> | 2016-09-06 09:34:09 -0500 |
commit | fbccae4d190c91aa689defc2fbf25744b369df05 (patch) | |
tree | b7b1de8dcd6ba48ada590ded7268938007a40e0f /activemodel/lib/active_model | |
parent | 38fae35d53a029ee5b9c1192cb67ce2aa28f3904 (diff) | |
download | rails-fbccae4d190c91aa689defc2fbf25744b369df05.tar.gz rails-fbccae4d190c91aa689defc2fbf25744b369df05.tar.bz2 rails-fbccae4d190c91aa689defc2fbf25744b369df05.zip |
Fix Remaining Case-In-Assignment Statement Formatting
Recently, the Rails team made an effort to keep the source code consistent, using Ruboco
(bb1ecdcc677bf6e68e0252505509c089619b5b90 and below). Some of the case
statements were missed.
This changes the case statements' formatting and is consistent with changes
in 810dff7c9fa9b2a38eb1560ce0378d760529ee6b and db63406cb007ab3756d2a96d2e0b5d4e777f8231.
Diffstat (limited to 'activemodel/lib/active_model')
-rw-r--r-- | activemodel/lib/active_model/type/decimal.rb | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/activemodel/lib/active_model/type/decimal.rb b/activemodel/lib/active_model/type/decimal.rb index 6266933636..6c5c0451c6 100644 --- a/activemodel/lib/active_model/type/decimal.rb +++ b/activemodel/lib/active_model/type/decimal.rb @@ -16,18 +16,19 @@ module ActiveModel private def cast_value(value) - casted_value = case value - when ::Float - convert_float_to_big_decimal(value) - when ::Numeric, ::String - BigDecimal(value, precision.to_i) - else - if value.respond_to?(:to_d) - value.to_d - else - cast_value(value.to_s) - end - end + casted_value = \ + case value + when ::Float + convert_float_to_big_decimal(value) + when ::Numeric, ::String + BigDecimal(value, precision.to_i) + else + if value.respond_to?(:to_d) + value.to_d + else + cast_value(value.to_s) + end + end apply_scale(casted_value) end |