apiotics 0.1.134 → 0.1.135
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: d699ef9b30e7c21d5332a184a8c383b0563e30ed
|
4
|
+
data.tar.gz: a125d2352dc93c07279d66d2fb959bdd9f1b3963
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a5468a2bb0a9d4fd38ae6a98f7124f5da2c1a3f6d676b5a14c5cbcc1053573e24bb97f3d23866b5fa2180fecc120b7fadc014effd95376499152f1db3b383d4
|
7
|
+
data.tar.gz: 9dfaa371989a77c5900a53ac06c81ea99aa5618ef5d300bdb82152673042e31fc06e49cedd69d0f4505d5e979250c82aeed7ce54ab3013db7bd3aa5c9f52565f
|
data/lib/apiotics/version.rb
CHANGED
@@ -11,9 +11,7 @@ module <%= module_name %>
|
|
11
11
|
<% unless @c == nil %><% @c[:attributes].each do |k,v| %><% unless v[:values] == "" || v[:values] == nil %>validates :<%= k.downcase.gsub(" ", "_").underscore %>, inclusion: { in: %w(<%= v[:values].join(" ") %>),
|
12
12
|
message: "%{value} is not a valid <%= k %>" }<% end %><% unless v[:range] == "" || v[:range] == nil %>
|
13
13
|
validates :<%= k.gsub(" ", "_").underscore %>, inclusion: { in: <%= v[:range] %>,
|
14
|
-
message: "%{value} is not within the range <%= v[:range] %>" }<% end %><%
|
15
|
-
enum <%= k.gsub(" ", "_").underscore %>: <%= v[:values] %><% end %><% end %><% end %>
|
16
|
-
|
14
|
+
message: "%{value} is not within the range <%= v[:range] %>" }<% end %><% end %><% end %>
|
17
15
|
|
18
16
|
def sync
|
19
17
|
Apiotics.sync(self)
|
@@ -24,11 +24,16 @@
|
|
24
24
|
<%%= form.simple_fields_for :<%= key.underscore.downcase %> do |fields| %>
|
25
25
|
<% n = 0 %>
|
26
26
|
<% Apiotics.configuration.targets[module_name][key].each do |interface| %>
|
27
|
+
<% a = Apiotics.get_attributes(module_name,key) %>
|
27
28
|
<% if n != 0 %>
|
28
29
|
<tr>
|
29
30
|
<% end %>
|
30
31
|
<td>
|
31
|
-
|
32
|
+
<% if a[:attributes][interface][:type] == "enum" %>
|
33
|
+
<%%= fields.input :<%= interface %>, collection: JSON.parse(<%= a[:attributes][interface][:values] %>) %> %>
|
34
|
+
<% else %>
|
35
|
+
<%%= fields.input :<%= interface %> %>
|
36
|
+
<% end %>
|
32
37
|
</td>
|
33
38
|
<% if n != 0 %>
|
34
39
|
</tr>
|