active_list 6.0.0 → 6.0.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -97,7 +97,7 @@ module ActiveList
|
|
97
97
|
code << '{' + conditions.collect{|key, value| key.to_s + ': ' + sanitize_condition(value)}.join(',') + '}'
|
98
98
|
when Symbol # Method
|
99
99
|
code << conditions.to_s + "(options)"
|
100
|
-
when
|
100
|
+
when CodeString
|
101
101
|
code << "(" + conditions.gsub(/\s*\n\s*/, ';') + ")"
|
102
102
|
when String
|
103
103
|
code << conditions.inspect
|
@@ -126,7 +126,7 @@ module ActiveList
|
|
126
126
|
# # else
|
127
127
|
# value.inspect
|
128
128
|
# # end
|
129
|
-
# elsif value.is_a?
|
129
|
+
# elsif value.is_a? CodeString
|
130
130
|
# value.inspect
|
131
131
|
# elsif value.is_a? String
|
132
132
|
# '"' + value.gsub('"', '\"') + '"'
|
data/lib/active_list/helpers.rb
CHANGED
@@ -4,17 +4,17 @@ module ActiveList
|
|
4
4
|
def recordify!(value, record_name)
|
5
5
|
if value.is_a?(Symbol)
|
6
6
|
return record_name + "." + value.to_s
|
7
|
-
elsif value.is_a?(
|
7
|
+
elsif value.is_a?(CodeString)
|
8
8
|
return "(" + value.gsub(/RECORD/, record_name) + ")"
|
9
9
|
else
|
10
|
-
raise ArgumentError, "
|
10
|
+
raise ArgumentError, "CodeString or Symbol must be given to be recordified)"
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
14
|
def recordify(value, record_name)
|
15
15
|
if value.is_a?(Symbol)
|
16
16
|
return record_name + "." + value.to_s
|
17
|
-
elsif value.is_a?(
|
17
|
+
elsif value.is_a?(CodeString)
|
18
18
|
return "(" + value.gsub(/RECORD/, record_name) + ")"
|
19
19
|
else
|
20
20
|
return value.inspect
|
@@ -22,7 +22,7 @@ module ActiveList
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def urlify(value, record_name)
|
25
|
-
if value.is_a?(
|
25
|
+
if value.is_a?(CodeString)
|
26
26
|
return "(" + value.gsub(/RECORD/, record_name) + ")"
|
27
27
|
else
|
28
28
|
return value.inspect
|
data/lib/active_list/version.rb
CHANGED