apiotics 0.1.137 → 0.1.138
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 926cd922c98a9768fa045d4ddc33872171581786
|
4
|
+
data.tar.gz: 3637e7d3c43c0df5fa4c2507f838639215f0e66b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48aad72c6a815f6d3c9104e609be79c15304e21305311a28c4a127dc657cb068be92a57a43e8b599e6a4b6722871cc1092410763b161f193b849c1b7719eab44
|
7
|
+
data.tar.gz: 0c6f3cf89156258a04bf30add4a5eea2490fbc5f64d878bc0b1aa348caf8297f10fea76659fdf488eb986adc6e8094c4e22d4548bc96e5533eae883e4ddc2ff3
|
data/lib/apiotics/version.rb
CHANGED
@@ -8,10 +8,13 @@ module <%= module_name %>
|
|
8
8
|
attr_accessor :skip_extract
|
9
9
|
after_commit :extract, unless: :skip_extract
|
10
10
|
after_commit :channel_push
|
11
|
-
<% unless @c == nil %><% @c[:attributes].each do |k,v| %><% unless v[:values] == "" || v[:values] == nil %>
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
<% unless @c == nil %><% @c[:attributes].each do |k,v| %><% unless v[:values] == "" || v[:values] == nil %>
|
12
|
+
validates :<%= k.downcase.gsub(" ", "_").underscore %>, inclusion: { in: %w(<%= v[:values].join(" ") %>),
|
13
|
+
message: "%{value} is not a valid <%= k %>" }
|
14
|
+
<% end %><% unless v[:range] == "" || v[:range] == nil %>
|
15
|
+
validates :<%= k.gsub(" ", "_").underscore %>, inclusion: { in: <%= v[:range] %>,
|
16
|
+
message: "%{value} is not within the range <%= v[:range] %>" }
|
17
|
+
<% end %><% end %><% end %>
|
15
18
|
|
16
19
|
def sync
|
17
20
|
Apiotics.sync(self)
|