templus_models 1.6.2 → 1.6.3
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: 4fce44c9b0f1f75da70b4d376aec9a0e4a481c93
|
4
|
+
data.tar.gz: 4eb0034b3c38a11ecc2a2b3bfc29ad15ff8bd0b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4af3f3c02369cb89803de89ab810bc2ef4aa4b7586feb1dc251462689dd9da19f1a2c83d4ec710e9ce7e08fb0d9c51af992000a8aa6d8cd7237c907349299444
|
7
|
+
data.tar.gz: 9541d251870a4dabeb378598c6d4a08f21d62bc7a44a1bdd1abe5782ef7df579d7a6807ddbaa739fe6653d258bf33a5de44967f01665957c32dbaaf49dccc270
|
@@ -9,7 +9,7 @@ class CrudController < ApplicationController
|
|
9
9
|
c_helper = Module.const_get(params[:model].camelize).reflect_on_association(params[:associacao]).class_name
|
10
10
|
@crud_helper = Module.const_get("#{c_helper}Crud") unless params[:render] == "modal" and params[:action] == "new"
|
11
11
|
@url = crud_associacao_models_path(model: params[:model], id: params[:id], associacao: params[:associacao], page: params[:page], q: params[:q])
|
12
|
-
@
|
12
|
+
@clean_url = crud_associacao_models(model: params[:model], id: params[:id], associacao: params[:associacao])
|
13
13
|
@model_permission = c_helper.constantize
|
14
14
|
@id = params[:associacao_id] if params[:associacao_id]
|
15
15
|
else
|
@@ -17,7 +17,7 @@ class CrudController < ApplicationController
|
|
17
17
|
@model_permission = @model
|
18
18
|
@crud_helper = Module.const_get("#{params[:model]}_crud".camelize) unless params[:render] == "modal" and params[:action] == "new"
|
19
19
|
@url = crud_models_path(model: params[:model], page: params[:page], q: params[:q])
|
20
|
-
@
|
20
|
+
@clean_url = crud_models_path(model: params[:model])
|
21
21
|
@id = params[:id] if params[:id]
|
22
22
|
end
|
23
23
|
end
|
@@ -26,7 +26,7 @@
|
|
26
26
|
<% end %>
|
27
27
|
<% remote_form = false%>
|
28
28
|
<%else%>
|
29
|
-
<% url = "#{@
|
29
|
+
<% url = "#{@clean_url}/#{@record.new_record? ? 'create?render=modal' : @record.id.to_s+'/create?render=modal'}" %>
|
30
30
|
<% remote_form = true%>
|
31
31
|
<%end%>
|
32
32
|
<%= simple_nested_form_for @record, remote: remote_form, html: {class: "form-horizontal"}, url: url do |f| %>
|
@@ -61,4 +61,3 @@
|
|
61
61
|
<%= javascript_include_tag "crud/#{script}" %>
|
62
62
|
<% end %>
|
63
63
|
<% end %>
|
64
|
-
|
@@ -26,9 +26,9 @@
|
|
26
26
|
<div class="pull-right actions">
|
27
27
|
<% @crud_helper.top_links.each do |link| %>
|
28
28
|
<% if link[:can].present? %>
|
29
|
-
<%=render_link(link,@
|
29
|
+
<%=render_link(link,@clean_url) if self.instance_eval &link[:can]%>
|
30
30
|
<% else %>
|
31
|
-
<%=render_link(link,@
|
31
|
+
<%=render_link(link,@clean_url)%>
|
32
32
|
<% end %>
|
33
33
|
<%end%>
|
34
34
|
<% if @crud_helper.search_fields.present? %>
|
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.6.
|
4
|
+
version: 1.6.3
|
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: 2016-06-
|
12
|
+
date: 2016-06-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|