activeadmin_select_many 0.3.3 → 0.3.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d326b4fd06dc88911b5ec9da5b3790ad277c0753
|
4
|
+
data.tar.gz: 5a0e1c2f07992dee3c23806b6ce14e074eaf039f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3bfc12b5ed28f0094ef5e8ead2b839df85b7bff88c791c8c34471ebc080ab8396b0c2d12971764d392d3405c85e190818ec7993c54c026e5db0af071c608ea8d
|
7
|
+
data.tar.gz: 47e1eb447e3ea4ca6f62101f8608d30d80c83044e20812074631d8475dec71de5b0bf9e79c81cee4b92c5bce1d78f06c10cb38ab659c31abf48199ad0a349005
|
@@ -23,7 +23,7 @@ module Formtastic
|
|
23
23
|
def hidden_input
|
24
24
|
template.content_tag( :div, class: 'values', 'data-name': input_html_options[:name] ) do
|
25
25
|
values = object.send( input_name )
|
26
|
-
values = [values] if values.is_a?
|
26
|
+
values = [values] if values.is_a? Integer
|
27
27
|
values.each do |value|
|
28
28
|
template.concat template.hidden_field_tag( input_html_options[:name], value, {id: nil} )
|
29
29
|
end if values
|
@@ -59,7 +59,7 @@ module Formtastic
|
|
59
59
|
else
|
60
60
|
# TODO: add option unique ?
|
61
61
|
selected = object.send( input_name )
|
62
|
-
selected = [selected] if selected.is_a?
|
62
|
+
selected = [selected] if selected.is_a? Integer
|
63
63
|
selected ? collection.select { |option| !selected.include?( option[1] ) } : collection
|
64
64
|
end
|
65
65
|
opts = input_options.merge( name: nil, id: nil, multiple: true, 'data-select': 'src', size: options[:size] ? options[:size] : 4 )
|
@@ -68,7 +68,7 @@ module Formtastic
|
|
68
68
|
|
69
69
|
def select_dst_html
|
70
70
|
selected = options[:selected] ? options[:selected] : object.send( input_name )
|
71
|
-
selected = [selected] if selected.is_a?
|
71
|
+
selected = [selected] if selected.is_a? Integer
|
72
72
|
coll = selected ? collection.select { |option| selected.include?( option[1] ) } : collection
|
73
73
|
opts = input_options.merge( name: nil, id: nil, multiple: true, 'data-select': 'dst', size: options[:size] ? options[:size] : 4 )
|
74
74
|
template.select_tag nil, template.options_for_select( coll ), opts
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeadmin_select_many
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mattia Roccoberton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activeadmin
|