templus_models 1.2.5 → 1.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/crud/_form.html.erb +2 -1
- data/app/views/crud/_search.html.erb +1 -1
- data/lib/templus_models/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: add71ac877523c9cec2b851a4aebd5149d2f58fe
|
4
|
+
data.tar.gz: a3bdb024c57e70654f2d6f581e9855aab43c68cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f67c86cd4a3f4448a5b5778f29854adc55334571838c7c767c8ff16f3c3af30cce61f6713e298a221f24ff0c566219deb32c44d890669886252852939e03e253
|
7
|
+
data.tar.gz: 1900665598a1cc1083336a5cdbac4c532b9b0bdae9bf82da2c95044477317c8a8f2757a328164190a6795f6286671be9bba337e96df4ded0225593e814a73dba
|
@@ -28,6 +28,7 @@
|
|
28
28
|
|
29
29
|
<% end %>
|
30
30
|
<%@crud_helper.form_groups.each do |key, groups|%>
|
31
|
+
<% modelo = @model.reflect_on_association(key.to_s).class_name.constantize %>
|
31
32
|
<% if [:has_many,:has_and_belongs_to_many].include?(@model.reflect_on_association(key).macro) && @record.new_record? && !@record.send(key).present? %>
|
32
33
|
<% @record.send(key).build %>
|
33
34
|
<% elsif @record.new_record? && !@record.send(key).present?%>
|
@@ -38,7 +39,7 @@
|
|
38
39
|
<h3 class="col-sm-2"><%= key.to_s.singularize.titleize %></h3>
|
39
40
|
</div>
|
40
41
|
<% groups.each do |field| %>
|
41
|
-
<%= render_field(field,g,@
|
42
|
+
<%= render_field(field,g,modelo,@record) %>
|
42
43
|
<% end %>
|
43
44
|
<% if [:has_many,:has_and_belongs_to_many].include?(@model.reflect_on_association(key).macro) %>
|
44
45
|
<div class="form-group">
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Fechar</span></button>
|
6
6
|
<i class="fa fa-search modal-icon"></i>
|
7
7
|
<h4 class="modal-title">Pesquisa</h4>
|
8
|
-
<small class="font-bold"
|
8
|
+
<small class="font-bold"></small>
|
9
9
|
</div>
|
10
10
|
<div class="modal-body">
|
11
11
|
<%=raro_search_form(@model, 'records','records',"/crud/#{@model.name.underscore}/query") do%>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: templus_models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rodrigo Sol
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-07-
|
12
|
+
date: 2015-07-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|