templus_models 1.2.4 → 1.2.5

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: f40049a130be15773eb9bfbc66db8112331a7397
4
- data.tar.gz: d5dab79cff5a21238652c28cd5992d933423ce14
3
+ metadata.gz: 5cb1e19b19b29a0ebe81be8aa45342910bff7392
4
+ data.tar.gz: 07b8e9f2312464d04b34ff08b56caaf655e9b9a6
5
5
  SHA512:
6
- metadata.gz: de03fcada6f4e9008e2d9314beea4aea5c15b3669d6b22e3cfdac8cfc93649267761da68b0fe7c418059e18b295ce67dbf7dcd8d3e8212f3935a490b36be30cb
7
- data.tar.gz: d2717ff5a912d42edd7e07d14349594df4125201d0eceef951369ab7e78e5f7a46782625270675286458f78e60817a2eaf98e67da3e7861ccdf09fe1ea6e9de4
6
+ metadata.gz: ff4003d4301b1de911de8fbfbf83309bcedc24f5b26014a02e9b40805fdc997f03b30063b9db383f1e51f42b58ac89032ae7b2f28e663351f3a0469ac3bdac80
7
+ data.tar.gz: 691350d5f9626790b04ef06f3fa7ee682e9141be26e58643ec6b0e05fd856d3f1c2ba5cc202b6a8ed7bb57d1c243c267f3c78dc0cf2a011a808e3ac390aaf5cb
@@ -163,7 +163,7 @@ class CrudController < ApplicationController
163
163
  chave = "#{key}_attributes"
164
164
  group = {chave => [:id, :_destroy]}
165
165
  groups.each do |field|
166
- modelo = key.to_s.singularize.camelcase.constantize
166
+ modelo = @model.reflect_on_association(key.to_s).class_name.constantize
167
167
  if modelo.reflect_on_association(field[:attribute])
168
168
  if modelo.reflect_on_association(field[:attribute]).macro == :belongs_to
169
169
  group[chave] << "#{field[:attribute]}_id".to_sym
@@ -1,3 +1,3 @@
1
1
  module TemplusModels
2
- VERSION = "1.2.4"
2
+ VERSION = "1.2.5"
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.2.4
4
+ version: 1.2.5
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-03 00:00:00.000000000 Z
12
+ date: 2015-07-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails