templus_models 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/crud_controller.rb +1 -1
- data/lib/templus_models/version.rb +1 -1
- metadata +1 -2
- data/README.rdoc +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21ed0dab6a17c940740555ee5b74e3f9a8377b5d
|
4
|
+
data.tar.gz: 808ac23488ba50e6ca6edd49c0c9b0a749b0e895
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6b6fa6c45eb9e2278c098b38e6f440f5d1fcd2dc677580fc62be80459fcbe175c8d095a43772f8dd9983396370d19e1ee2ccab25d592c934e6eac1de7d72b4a
|
7
|
+
data.tar.gz: 44bfda80b668657dbf2c8075a162c9ce08d08f2bedb6d3b661a6b46faf96273e47aa439217ac9901c4b18df0699ae2db3d6c0da04770b42571e4e8c0030e85d6
|
@@ -147,7 +147,7 @@ class CrudController < ApplicationController
|
|
147
147
|
chave = "#{key}_attributes"
|
148
148
|
group = {chave => [:id, :_destroy]}
|
149
149
|
groups.each do |field|
|
150
|
-
modelo = key.to_s.camelcase.constantize
|
150
|
+
modelo = key.to_s.singularize.camelcase.constantize
|
151
151
|
if modelo.reflect_on_association(field[:attribute])
|
152
152
|
if modelo.reflect_on_association(field[:attribute]).macro == :belongs_to
|
153
153
|
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.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rodrigo Sol
|
@@ -118,7 +118,6 @@ extensions: []
|
|
118
118
|
extra_rdoc_files: []
|
119
119
|
files:
|
120
120
|
- MIT-LICENSE
|
121
|
-
- README.rdoc
|
122
121
|
- Rakefile
|
123
122
|
- app/assets/javascripts/raro_crud.js
|
124
123
|
- app/assets/javascripts/templus_models.js.coffee
|
data/README.rdoc
DELETED