aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/number_helper.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/actionpack/lib/action_view/helpers/number_helper.rb b/actionpack/lib/action_view/helpers/number_helper.rb
index 15f032b3d6..4f8cc2012c 100644
--- a/actionpack/lib/action_view/helpers/number_helper.rb
+++ b/actionpack/lib/action_view/helpers/number_helper.rb
@@ -52,10 +52,8 @@ module ActionView
begin
Float(number)
rescue ArgumentError, TypeError
- if options[:raise]
- raise InvalidNumberError, number
- end
- end
+ raise InvalidNumberError, number
+ end if options[:raise]
number = number.to_s.strip
options = options.symbolize_keys