activeadmin_select_many 0.2.2 → 0.2.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: f52caa2a1d61db342c777d0916d40fcc0d4a99a6
|
4
|
+
data.tar.gz: a6a6111dcca00954075be6e914e6c274c56e219f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0a062c899ff3b0b39ceb6070c2479e722696a95bd8d9d3ea92b8a23968a2445c9f6db74413d50e69635cc15937989892a4bba9c959b7fb7708f95276a0cc83c
|
7
|
+
data.tar.gz: 90599fe425f00b460048b4087a03491d1f7bec7fdb0c4967cd5092fe96751f77502264c86cbe61e2bd158561f7daa631a7113709f4e94cabe16e92af3c8d045f
|
data/README.md
CHANGED
@@ -40,6 +40,7 @@ Features for *select_one*:
|
|
40
40
|
- **placeholder**: placeholder string for search box
|
41
41
|
- **remote_collection**: JSON path
|
42
42
|
- **search_param**: parameter to use as search key (ransack format)
|
43
|
+
- **selected**: force value selection (array for *select_many*, single value for *select_one*)
|
43
44
|
- **size**: number of rows of both the selects (default: 4)
|
44
45
|
- **sortable**: set to true to enable sortable buttons (default: not set)
|
45
46
|
|
@@ -58,7 +58,7 @@ module Formtastic
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def select_dst_html
|
61
|
-
selected = object.send( input_name )
|
61
|
+
selected = options[:selected] ? options[:selected] : object.send( input_name )
|
62
62
|
selected = [selected] if selected.is_a? Fixnum
|
63
63
|
coll = selected ? collection.select { |option| selected.include?( option[1] ) } : collection
|
64
64
|
opts = input_options.merge( name: nil, id: nil, multiple: true, 'data-select': 'dst', size: options[:size] ? options[:size] : 4 )
|
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.2.
|
4
|
+
version: 0.2.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: 2017-10-
|
11
|
+
date: 2017-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activeadmin
|