active_admin-inputs-filters-comparable_select_input 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 40a0f9102d1bc3d67470e7c867aef98606a5ce3d
|
|
4
|
+
data.tar.gz: 8faa9785fdb67a3a3698469d06486e4bb3b33b2e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4886c68f4868d811eb444f0ed286796d4e1376fb630a9ce526678a8c597282b01b035243d81ffdf568537c16ce41abe9155704b32a71416c15d0bfbe40681e8b
|
|
7
|
+
data.tar.gz: bc97ad55ff2050739bfa76a53202c3f6cf54975f9e6ab9562d4e526dea59d8974a08e0857b151d80510ec5616ea693047a4a9a93ee0ad6300639026b6c24e10f
|
data/README.md
CHANGED
|
@@ -36,7 +36,7 @@ filter :rarity, as: :comparable_select, collection: { 'common' => 10, 'uncommon'
|
|
|
36
36
|
|
|
37
37
|
## Contributing
|
|
38
38
|
|
|
39
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
|
39
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/skuroki/active_admin-inputs-filters-comparable_select_input. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
|
40
40
|
|
|
41
41
|
## License
|
|
42
42
|
|
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
|
4
4
|
|
|
5
5
|
Gem::Specification.new do |spec|
|
|
6
6
|
spec.name = "active_admin-inputs-filters-comparable_select_input"
|
|
7
|
-
spec.version = '0.1.
|
|
7
|
+
spec.version = '0.1.1'
|
|
8
8
|
spec.authors = ["KUROKI Shinsuke"]
|
|
9
9
|
spec.email = ["s-kuroki@aiming-inc.com"]
|
|
10
10
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
$(document).on 'ready page:load', ->
|
|
2
|
-
$('.filter_form_field.select_and_select select
|
|
3
|
-
$(@).siblings('select
|
|
2
|
+
$('.filter_form_field.select_and_select select.predicate').change ->
|
|
3
|
+
$(@).siblings('select.subject').prop name: "q[#{@value}]"
|
|
@@ -17,6 +17,17 @@ module ActiveAdmin
|
|
|
17
17
|
opts
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
+
def input_html_options
|
|
21
|
+
opts = super
|
|
22
|
+
opts[:class] ||= ''
|
|
23
|
+
opts[:class] = (opts[:class].split(' ') + ['subject']).join(' ')
|
|
24
|
+
opts
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def select_html
|
|
28
|
+
template.select_tag '', template.options_for_select(filter_options, current_filter), class: 'predicate'
|
|
29
|
+
end
|
|
30
|
+
|
|
20
31
|
class Engine < ::Rails::Engine
|
|
21
32
|
end
|
|
22
33
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: active_admin-inputs-filters-comparable_select_input
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- KUROKI Shinsuke
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-10-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|