effective_resources 1.0.18 → 1.0.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/effective/resources/forms.rb +5 -7
- data/lib/effective_resources/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: 2d1f8af977978cf1bb45d0cc6a737396cba17f55
|
4
|
+
data.tar.gz: b57662a6e2e9934e8824b1b1f9a3d209eaeef8d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63bd096d0c815c10a817790ff5245ef946e41cb4b1beec69d3f9eb2461a79824867e46a8267efa44a043a8e337002e9323badf0dd5102d82c508b6cc831d63bf
|
7
|
+
data.tar.gz: d240fa175ec01452e98214ad4e28dc2ee2fef2f43ed74349520ab7268546192e95c435c005e977d8faa66b3ad133ffea97ebf11d38834336cf54664568b35e7b
|
@@ -11,13 +11,11 @@ module Effective
|
|
11
11
|
constant_pluralized = name.to_s.upcase
|
12
12
|
constant = name.to_s.pluralize.upcase
|
13
13
|
|
14
|
-
if defined?("#{klass.name}::#{constant}")
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
{ as: :string }
|
20
|
-
end
|
14
|
+
collection = (klass.const_get(constant) rescue nil) if defined?("#{klass.name}::#{constant}")
|
15
|
+
collection ||= (klass.const_get(constant_pluralized) rescue nil) if defined?("#{klass.name}::#{constant_pluralized}")
|
16
|
+
collection ||= {}
|
17
|
+
|
18
|
+
{ as: :select, polymorphic: true, collection: collection }
|
21
19
|
when :has_and_belongs_to_many
|
22
20
|
{ as: :select }.merge(search_form_field_collection(has_and_belongs_to_many(name)))
|
23
21
|
when :has_many
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_resources
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-12-
|
11
|
+
date: 2018-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|