activeadmin_addons 1.8.2 → 1.8.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
  SHA256:
3
- metadata.gz: 978146b1270bbb4e9b1f657b0c1849926c8f6099c3941b3af44138c26314eda3
4
- data.tar.gz: 8aa286c800a12d251cd74d4fea110fc91ac4fa15af88ed8760365b5a6fc57042
3
+ metadata.gz: 55def873497d38747a6897932970590af63bd4dd135293804d7b39a938fd082f
4
+ data.tar.gz: 7e544cbc4d57033643f9334d46c05769044423faca46b1a2ea3b8335340a4ecd
5
5
  SHA512:
6
- metadata.gz: 689b2a705a12e48bc4f261d10b9b15b93c8db70ce188b1b720f5ececd3adec687cbb158a9b4ba11dc8043550d8b81d0837e4dd865e45cabc85671226897b325d
7
- data.tar.gz: fb203c1b7be7fadc734b07e30f9383626abbc3a6d899b888967585fe58abbfd40d7301b5fcdb8f5c7db82de3b14ab892ed74ff9e51fa65891324fb2a2239901e
6
+ metadata.gz: 91987d8083fb82cfb200f87bd252ccaed20bbb7072be7ff9853d492e13baf089d6bd4e564996711f25f44f4105608de539e68dac4d17d918c0c74f3fb497577e
7
+ data.tar.gz: 770e27656a0ba98f37a32e449c35ed06a55d7cb9b07b090177bebcee25681b76d0c9c12f10507da31a068e7114ff76b9d5709a4e950867f5c2948d73225ca3e7
@@ -4,7 +4,11 @@ class ActiveAdmin::Inputs::SelectInput < Formtastic::Inputs::SelectInput
4
4
  end
5
5
 
6
6
  def raw_collection
7
- field_value = object.send(method)
7
+ field_value = begin
8
+ object.send(method)
9
+ rescue NoMethodError
10
+ nil
11
+ end
8
12
 
9
13
  @options[:tags].present? && field_value.present? ? (super.to_a << field_value).uniq : super
10
14
  end
@@ -1,5 +1,11 @@
1
1
  class DateRangeInput < ActiveAdmin::Inputs::Filters::DateRangeInput
2
- def input_html_options
3
- super.except(:maxlength, :size).merge({ autocomplete: 'off' })
2
+ if instance_methods(true).include?(:input_html_options_for)
3
+ def input_html_options
4
+ super.except(:maxlength, :size).merge(autocomplete: 'off')
5
+ end
6
+ else
7
+ def input_html_options(input_name = gt_input_name, placeholder = gt_input_placeholder)
8
+ super(input_name, placeholder).except(:maxlength, :size).merge(autocomplete: 'off')
9
+ end
4
10
  end
5
11
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveadminAddons
2
- VERSION = "1.8.2"
2
+ VERSION = "1.8.3"
3
3
  end
@@ -8,12 +8,20 @@ module ActiveadminAddons
8
8
  end
9
9
 
10
10
  def setup_assets
11
- if ActiveAdmin.application.use_webpacker
11
+ if use_webpacker?
12
12
  generate "activeadmin_addons:webpacker"
13
13
  else
14
14
  generate "activeadmin_addons:assets"
15
15
  end
16
16
  end
17
+
18
+ private
19
+
20
+ def use_webpacker?
21
+ ActiveAdmin.application.use_webpacker
22
+ rescue NoMethodError
23
+ false
24
+ end
17
25
  end
18
26
  end
19
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin_addons
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.2
4
+ version: 1.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Platanus
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2021-07-01 00:00:00.000000000 Z
14
+ date: 2021-07-27 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: active_material