montage_rails 0.7.1 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8ebf145d607a7d72148f127a6d453a6db4b9c9f6
4
- data.tar.gz: d8ed10d707234147dd5437e3b3482c9a5ebf0552
3
+ metadata.gz: 5670a0b572ae41ea4a4118199cb07309f40b8630
4
+ data.tar.gz: 011f5b8d5fb0a0837624d276be7547f9c5818805
5
5
  SHA512:
6
- metadata.gz: ae8d79d5622f978121227ab6d9883e7a1b8fb3017196227078fe1b9c51d7b18cb495fb9278c159e418c42406ec54d09341527664888f0d512624889deeb7c409
7
- data.tar.gz: 6f69ecde6ce093dea3f7dafee7719d79ebad6f75f0f05a6d0f50a283f38e2f53cfad645187af40131594cc2627716d31f35e6ef7dff7ee2bd116d54ada22723f
6
+ metadata.gz: cbd621fea215d3fc07146e92c9de9ca82b5f56da39497bcee2c7136850b0a6fde4efe3d91b51bbbae6ad89fcb1dc15c858f1824005dbb3f742503ccce4ce7c9f
7
+ data.tar.gz: e1dd644a384d71fd43936f635d795603380693f136efb1c15e91f8213ac8fb898cf406d31abc49a9141673a10cc1c4147ffc99f11b76f9c42c4e2e4d7572df3d
@@ -29,17 +29,18 @@ module MontageRails
29
29
  # Returns true or false
30
30
  #
31
31
  def is_i?(value)
32
- /\A\d+\z/ =~ value
32
+ /\A\d+\z/ =~ value.to_s
33
33
  end
34
34
 
35
35
  # Determines if the string value passed in is a float
36
36
  # Returns true or false
37
37
  #
38
38
  def is_f?(value)
39
- /\A\d+\.\d+\z/ =~ value
39
+ /\A\d+\.\d+\z/ =~ value.to_s
40
40
  end
41
41
 
42
42
  def coerce(value)
43
+ return nil unless value
43
44
  return value if value.is_a?(TYPE_MAP[type])
44
45
 
45
46
  if is_i?(value)
@@ -1,3 +1,3 @@
1
1
  module MontageRails
2
- VERSION = "0.7.1"
2
+ VERSION = "0.7.2"
3
3
  end