activeadmin_select_many 0.3.3 → 0.3.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: 803eb9cc01dbf1ae9baa62aca6143a2fd4f3bbeb
4
- data.tar.gz: e24f251be408c8381b4d4c70cba8ecb5230464c3
3
+ metadata.gz: d326b4fd06dc88911b5ec9da5b3790ad277c0753
4
+ data.tar.gz: 5a0e1c2f07992dee3c23806b6ce14e074eaf039f
5
5
  SHA512:
6
- metadata.gz: 15af5bf94a4a6cefe08ca45425e6f93a011272238d818ecf6e265b6cc04c84f1037dc8d93e911f57e7dc05c0d5ca70fc380e6a78736640c2cf89b03e77f3cf23
7
- data.tar.gz: cf6fba412823f738a0ed7d1346cd636da1f2c00654d5a09b2c1ab50dbec1c87f76215479cf44a0c6ef28e3ca252733e00854f47d3119f91b44813ae08be7abd4
6
+ metadata.gz: 3bfc12b5ed28f0094ef5e8ead2b839df85b7bff88c791c8c34471ebc080ab8396b0c2d12971764d392d3405c85e190818ec7993c54c026e5db0af071c608ea8d
7
+ data.tar.gz: 47e1eb447e3ea4ca6f62101f8608d30d80c83044e20812074631d8475dec71de5b0bf9e79c81cee4b92c5bce1d78f06c10cb38ab659c31abf48199ad0a349005
@@ -1,5 +1,5 @@
1
1
  module ActiveAdmin
2
2
  module SelectMany
3
- VERSION = '0.3.3'
3
+ VERSION = '0.3.4'
4
4
  end
5
5
  end
@@ -23,7 +23,7 @@ module Formtastic
23
23
  def hidden_input
24
24
  template.content_tag( :div, class: 'values', 'data-name': input_html_options[:name] ) do
25
25
  values = object.send( input_name )
26
- values = [values] if values.is_a? Fixnum
26
+ values = [values] if values.is_a? Integer
27
27
  values.each do |value|
28
28
  template.concat template.hidden_field_tag( input_html_options[:name], value, {id: nil} )
29
29
  end if values
@@ -59,7 +59,7 @@ module Formtastic
59
59
  else
60
60
  # TODO: add option unique ?
61
61
  selected = object.send( input_name )
62
- selected = [selected] if selected.is_a? Fixnum
62
+ selected = [selected] if selected.is_a? Integer
63
63
  selected ? collection.select { |option| !selected.include?( option[1] ) } : collection
64
64
  end
65
65
  opts = input_options.merge( name: nil, id: nil, multiple: true, 'data-select': 'src', size: options[:size] ? options[:size] : 4 )
@@ -68,7 +68,7 @@ module Formtastic
68
68
 
69
69
  def select_dst_html
70
70
  selected = options[:selected] ? options[:selected] : object.send( input_name )
71
- selected = [selected] if selected.is_a? Fixnum
71
+ selected = [selected] if selected.is_a? Integer
72
72
  coll = selected ? collection.select { |option| selected.include?( option[1] ) } : collection
73
73
  opts = input_options.merge( name: nil, id: nil, multiple: true, 'data-select': 'dst', size: options[:size] ? options[:size] : 4 )
74
74
  template.select_tag nil, template.options_for_select( coll ), opts
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.3.3
4
+ version: 0.3.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-28 00:00:00.000000000 Z
11
+ date: 2018-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeadmin