templus_models 1.2.4 → 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/crud_controller.rb +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: 5cb1e19b19b29a0ebe81be8aa45342910bff7392
|
|
4
|
+
data.tar.gz: 07b8e9f2312464d04b34ff08b56caaf655e9b9a6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
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
|
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.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-
|
|
12
|
+
date: 2015-07-06 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rails
|