activeadmin_selectize 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +1 -1
- data/README.md +21 -0
- data/lib/activeadmin/selectize/version.rb +1 -1
- data/lib/formtastic/inputs/selectize_input.rb +3 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3a61a8c9ec00cdabdd940c905360d58fd5621bf
|
4
|
+
data.tar.gz: 4f2202a52a27293e7486924c5fee9c2cc02023e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc89542066d7716d13db44fa67421e1e2c1168c82bdf98bce104b098e3d2157b28dd28e7c1b138fc30d4fdb9fbdaac0d7e24a7056032ddda9b9ddc961c280869
|
7
|
+
data.tar.gz: 521326d5a96cf23c3d82331dafca7df7a5036ff74198b8c14d1aa4c0eaf8faa541fc3a17676d0a154869632c7b33e78ff4ffac7560a7df53e11594c971b20faa
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -25,6 +25,18 @@ Features:
|
|
25
25
|
|
26
26
|
Why 2 separated scripts? In this way you can include a different version of Selectize.js if you like.
|
27
27
|
|
28
|
+
## Notes
|
29
|
+
|
30
|
+
- In ActiveAdmin json routes should be enabled by default, this behavior is controlled by *download_links* option for index action. Example:
|
31
|
+
|
32
|
+
```rb
|
33
|
+
index download_links: [:csv, :json] do
|
34
|
+
# ...
|
35
|
+
end
|
36
|
+
```
|
37
|
+
|
38
|
+
- If the select items "gets cut" by the container try adding: `'data-opts': '{"dropdownParent":"body"}'`
|
39
|
+
|
28
40
|
## Example
|
29
41
|
|
30
42
|
Example 1: an Article model with a many-to-many relation with Tag model:
|
@@ -49,6 +61,15 @@ end
|
|
49
61
|
end
|
50
62
|
```
|
51
63
|
|
64
|
+
Example 2: using selectize in filters:
|
65
|
+
|
66
|
+
```ruby
|
67
|
+
# Without remote items (no AJAX):
|
68
|
+
filter :name_eq, as: :selectize, collection: Author.all.pluck( :name, :name )
|
69
|
+
# With remote items:
|
70
|
+
filter :tags_id_eq, as: :selectize, collection: [], input_html: { 'data-opt-remote': '/admin/tags.json', 'data-opt-text': 'name', 'data-opt-value': 'id', 'data-opts': '{"dropdownParent":"body"}', placeholder: 'Search a tag...' }
|
71
|
+
```
|
72
|
+
|
52
73
|
## Options
|
53
74
|
|
54
75
|
Pass the required options using `input_html`.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeadmin_selectize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.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-
|
11
|
+
date: 2017-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activeadmin
|
@@ -70,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
70
70
|
version: '0'
|
71
71
|
requirements: []
|
72
72
|
rubyforge_project:
|
73
|
-
rubygems_version: 2.
|
73
|
+
rubygems_version: 2.6.13
|
74
74
|
signing_key:
|
75
75
|
specification_version: 4
|
76
76
|
summary: Selectize for ActiveAdmin
|