fix number detection in feed fields
This commit is contained in:
parent
4d27c5dfe6
commit
1052f35c98
@ -1,7 +1,7 @@
|
|||||||
module ApplicationHelper
|
module ApplicationHelper
|
||||||
|
|
||||||
def is_a_number?(s)
|
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
|
end
|
||||||
|
|
||||||
def parsefloat(number)
|
def parsefloat(number)
|
||||||
|
Loading…
Reference in New Issue
Block a user