templus_models 1.5.1 → 1.5.2

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: 80f1e2e40963c0e811abc82f354f9cae07dc0a31
4
- data.tar.gz: 43afe8aa7d3d88c676151047f5609b0e27cd8bc3
3
+ metadata.gz: eec9f6718520ae99d686f122694a1fe37cfab627
4
+ data.tar.gz: 3a4e215f8924c5db90173309119bb62ea7b5ed51
5
5
  SHA512:
6
- metadata.gz: 76be09a138c33eeeaf937e19eabe493c84331b72fd29dba291eea92614b3d12001a9ec7c1e42da6d1934b544de05ec6da551dfa405385bef4a9f0b48db10b2db
7
- data.tar.gz: f742637f9febc3494684ac2602af4ed503324b41f71c48b91abc210e0c74ef66961580a74b71927851d0f6c0ff9c33efb27ac62e273f30b8ccb7bca4d8ed2336
6
+ metadata.gz: 8608adf4e91b264bbb95b0627652ff9d9b75e76627e27adcb41503d3c83a5342b7c8bf3388d1e782671836b37eac6a71ee0e3dc4266441a9c182e493260daca6
7
+ data.tar.gz: fe47911c91fbcb6e01ab695a448a08aef4ae65dba576fa85530466cda9e5cd36f660332457cb38b58f6aa180601d03124858f99d5de78532fc4189a11a1087c1
@@ -6,7 +6,8 @@ class CrudController < ApplicationController
6
6
  if params[:associacao]
7
7
  @crud_associacao = Module.const_get("#{params[:model].to_s.singularize}_crud".camelize)
8
8
  @model = Module.const_get(params[:model].camelize).find(params[:id]).send(params[:associacao])
9
- @crud_helper = Module.const_get("#{params[:associacao].to_s.singularize}_crud".camelize) unless params[:render] == "modal" and params[:action] == "new"
9
+ c_helper = Module.const_get(params[:model].camelize).reflect_on_association(params[:associacao]).class_name
10
+ @crud_helper = Module.const_get("#{c_helper}Crud") unless params[:render] == "modal" and params[:action] == "new"
10
11
  @url = "/crud/#{params[:model]}/#{params[:id]}/#{params[:associacao]}"
11
12
  @id = params[:associacao_id] if params[:associacao_id]
12
13
  else
@@ -1,3 +1,3 @@
1
1
  module TemplusModels
2
- VERSION = "1.5.1"
2
+ VERSION = "1.5.2"
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.5.1
4
+ version: 1.5.2
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-11-10 00:00:00.000000000 Z
12
+ date: 2015-11-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails