diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 8027a70..7aee74d 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,7 +1,7 @@ module ApplicationHelper def is_a_number?(s) - s.to_s.gsub(/,/, '.').match(/\A[+-]?\d+?(\.\d+)?\Z/) == nil ? false : true + s.to_s.strip.gsub(/,/, '.').match(/\A[+-]?\d+?(\.\d+)?\Z/) == nil ? false : true end def parsefloat(number)