activeadmin-ajax_filter 0.3.2 → 0.3.3

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: 9f8daf7f6e6095bf60566d68f47ca57302c833ca
4
- data.tar.gz: 130338df6a6cd71c0bf0e24cb05fc7be74f8514c
3
+ metadata.gz: 1bc2b3bac1969b31954b1bae6a5c4068e180fd11
4
+ data.tar.gz: 0793f31ac698e16580752f3b2deae2c1ee108410
5
5
  SHA512:
6
- metadata.gz: 8bcbd3d1f5bd048c5a13a8a2ca9d745791884e795f8b3fae905d0ca5849e584ba64611ed6969ee3ef7788d75419b12f99bd3fa61f55531a275c49bf623c95e59
7
- data.tar.gz: 9f82be39e5e06b9288677515bc6d19a08ea8be69777f71d5b560b37bedd5ac9f12a09e7a7ef8e122e6e380d9b7912d0b6474df97460fc77b8dc8c5c321012666
6
+ metadata.gz: 48808be4a3e630bf35aa7a712832dc1cb8c2abea5cc998ee39afa111be190df9a683b8656f01204e749b0a8bc55cfb668849aae5094063290afc277309f6d5a3
7
+ data.tar.gz: 5223e7a7a51020539a6ab1fefa45de36e564aa97e59999fc36c53b6accdca29750ec438471111a5b6ba9926a3ee644ef233da63eeca4695bb0640c24207b1e95
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- activeadmin-ajax_filter (0.3.2)
4
+ activeadmin-ajax_filter (0.3.3)
5
5
  activeadmin (>= 1.0.0.pre1)
6
6
  coffee-rails (>= 4.1.0)
7
7
  selectize-rails (>= 0.11.2)
@@ -82,7 +82,7 @@ GEM
82
82
  coffee-script-source
83
83
  execjs
84
84
  coffee-script-source (1.10.0)
85
- concurrent-ruby (1.0.1)
85
+ concurrent-ruby (1.0.2)
86
86
  database_cleaner (1.5.3)
87
87
  diff-lcs (1.2.5)
88
88
  docile (1.1.5)
data/README.md CHANGED
@@ -64,7 +64,11 @@ end
64
64
  # Main resource
65
65
  # As a filter
66
66
  ActiveAdmin.register Invoice do
67
- filter :user, as: :ajax_select, data: { search_fields: [:email, :customer_uid], limit: 7 }
67
+ filter :user, as: :ajax_select, data: {
68
+ url: '/admin/users/filter',
69
+ search_fields: [:email, :customer_uid],
70
+ limit: 7,
71
+ }
68
72
  # ...
69
73
  end
70
74
 
@@ -72,7 +76,12 @@ end
72
76
  ActiveAdmin.register Invoice do
73
77
  form do |f|
74
78
  f.input :language # used by ajax_search_fields
75
- f.input :user, as: :ajax_select, data: { search_fields: [:name], static_ransack: { active_eq: true }, ajax_search_fields: [:language_id] }
79
+ f.input :user, as: :ajax_select, data: {
80
+ url: '/admin/users/filter',
81
+ search_fields: [:name],
82
+ static_ransack: { active_eq: true },
83
+ ajax_search_fields: [:language_id],
84
+ }
76
85
  # ...
77
86
  end
78
87
  end
@@ -36,7 +36,7 @@ $ ->
36
36
  input = relatedInput(field)
37
37
  if input.length
38
38
  (input.data('ajax-search-fields') or '').split(' ').some (ajaxField) ->
39
- relatedInput(ajaxField).attr('id') == initial_input_id
39
+ ajaxField.length > 0 && relatedInput(ajaxField).attr('id') == initial_input_id
40
40
 
41
41
  select.selectize
42
42
  valueField: valueField
@@ -1,5 +1,5 @@
1
1
  module ActiveAdmin
2
2
  module AjaxFilter
3
- VERSION = '0.3.2'
3
+ VERSION = '0.3.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin-ajax_filter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Emelyanov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-27 00:00:00.000000000 Z
11
+ date: 2016-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeadmin
@@ -307,4 +307,3 @@ signing_key:
307
307
  specification_version: 4
308
308
  summary: AJAX filters for ActiveAdmin
309
309
  test_files: []
310
- has_rdoc: