From 1052f35c98c8f1ce228b593ba5213d201c9930e1 Mon Sep 17 00:00:00 2001 From: Lee Lawlor Date: Mon, 29 Dec 2014 14:11:21 -0500 Subject: [PATCH] fix number detection in feed fields --- app/helpers/application_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)