cowtech-rails 1.1.1.0 → 1.1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cowtech/extensions.rb +1 -7
- data/lib/cowtech/version.rb +1 -1
- metadata +2 -2
data/lib/cowtech/extensions.rb
CHANGED
@@ -43,13 +43,7 @@ module Cowtech
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def to_boolean
|
46
|
-
|
47
|
-
true
|
48
|
-
elsif self.is_a?(FalseClass) || self.is_a?(NilClass) then
|
49
|
-
false
|
50
|
-
else
|
51
|
-
self.is_valid_boolean? ? (/^(1|on|true|yes|t|y)$/i.match(self.to_s.strip) != nil) : false
|
52
|
-
end
|
46
|
+
(self.is_a?(TrueClass) || /^(1|on|true|yes|t|y)$/i.match(self.to_s.strip)) ? true : false
|
53
47
|
end
|
54
48
|
|
55
49
|
def round_to_precision(prec = 2)
|
data/lib/cowtech/version.rb
CHANGED