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: 68829b481692aa4b79cb40342fbb97f844a7d7a8
4
- data.tar.gz: 8a9a70e922e0a182b4d13a5d2db2b660cfb256b3
3
+ metadata.gz: 4fce44c9b0f1f75da70b4d376aec9a0e4a481c93
4
+ data.tar.gz: 4eb0034b3c38a11ecc2a2b3bfc29ad15ff8bd0b7
5
5
  SHA512:
6
- metadata.gz: 4638992d8ac9a0b4465b3e4667095b4e754fefed9f5303a33320a8f2207f34a017b1cbf36a3027af03a560daf3b5326a3deede2a111706ff289bfcc8930c9b05
7
- data.tar.gz: 766241bb177be600d1c10ba0909429017e3350e7fa9ff090ad096dbd24929a2be0a86fa86f3454906f4ec6de8c0b0ea28d0dbf10257e7063375123bc3cfa980c
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
- @url_str = "/crud/#{params[:model]}/#{params[:id]}/#{params[:associacao]}"
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
- @url_str = "/crud/#{params[:model]}"
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 = "#{@url_str}/#{@record.new_record? ? 'create?render=modal' : @record.id.to_s+'/create?render=modal'}" %>
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,@url_str) if self.instance_eval &link[:can]%>
29
+ <%=render_link(link,@clean_url) if self.instance_eval &link[:can]%>
30
30
  <% else %>
31
- <%=render_link(link,@url_str)%>
31
+ <%=render_link(link,@clean_url)%>
32
32
  <% end %>
33
33
  <%end%>
34
34
  <% if @crud_helper.search_fields.present? %>
@@ -1,3 +1,3 @@
1
1
  module TemplusModels
2
- VERSION = "1.6.2"
2
+ VERSION = "1.6.3"
3
3
  end
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.2
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-17 00:00:00.000000000 Z
12
+ date: 2016-06-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails