effective_bootstrap 0.6.22 → 0.6.23
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d72c61d44ce408d80a2808597dd4daf832a252aabe2b27d4c3f95eb898df46d
|
4
|
+
data.tar.gz: cbc970b88741dbb2037e4789e7635742f209713738c4afa2612a2aabffc50411
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 200b5e59134c34c18eadaac8ae797bb360ae0020d9d3f2456064191e98aaf8f725219c19571f7419abe37c76e5202563e7664c9bace0ba47be940f45acf1ff62
|
7
|
+
data.tar.gz: 37f0e661c1b7783f1b4a0e6949a49ff2f2fc17e94959820e3c855aa1a6e4c5e3d66967f4b484866a3c6f8465d0138f89c191576189cf650a771436bd5fc61747
|
@@ -125,7 +125,13 @@ module Effective
|
|
125
125
|
if polymorphic?
|
126
126
|
{ group_method: :last, group_label_method: :first, option_key_method: :second, option_value_method: :first }
|
127
127
|
elsif grouped?
|
128
|
-
|
128
|
+
first = Array(options_collection.values.first).first
|
129
|
+
|
130
|
+
if first.kind_of?(ActiveRecord::Base)
|
131
|
+
{ group_method: :last, group_label_method: :first, option_value_method: :to_s, option_key_method: :id }
|
132
|
+
else
|
133
|
+
{ group_method: :last, group_label_method: :first, option_value_method: :first, option_key_method: :second }
|
134
|
+
end
|
129
135
|
elsif options_collection.first.kind_of?(Array)
|
130
136
|
{ label_method: :first, value_method: :second }
|
131
137
|
elsif options_collection.first.kind_of?(ActiveRecord::Base)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_bootstrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.23
|
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: 2020-04-
|
11
|
+
date: 2020-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|