kelredd-resourceful 0.5.6 → 0.5.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/resourceful/extensions.rb +4 -4
- data/lib/resourceful/model/base.rb +1 -1
- data/lib/resourceful/version.rb +1 -1
- metadata +1 -1
@@ -10,8 +10,8 @@ module Resourceful
|
|
10
10
|
module ClassMethods
|
11
11
|
end
|
12
12
|
|
13
|
-
unless nil.respond_to?(:
|
14
|
-
def
|
13
|
+
unless nil.respond_to?(:to_resourceful_boolean)
|
14
|
+
def to_resourceful_boolean
|
15
15
|
!!self
|
16
16
|
end
|
17
17
|
end
|
@@ -44,8 +44,8 @@ module Resourceful
|
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
|
-
unless "".respond_to?(:
|
48
|
-
def
|
47
|
+
unless "".respond_to?(:to_resourceful_boolean)
|
48
|
+
def to_resourceful_boolean
|
49
49
|
self.nil? || self.empty? || self =~ /^(false|0)$/i ? false : true
|
50
50
|
end
|
51
51
|
end
|
data/lib/resourceful/version.rb
CHANGED