auto_select2 0.2.1 → 0.2.2

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: e3d6624af9d5f131eafc59d8ecfde5a5e9a9d558
4
- data.tar.gz: d821780986f28b65b2de8c77ed95e47f937f14b8
3
+ metadata.gz: d4df7911483fb770cec21609c07b44cf9f3d331b
4
+ data.tar.gz: 7b55b2a104e128b848d1cb8fc197869944bac25b
5
5
  SHA512:
6
- metadata.gz: 36ff5e67ac0dafd10e88dcad6015badfa87a634266c357ba2e2cba4aac2ae965200bebb3f5f9533071999c26c0fd0b55ca80e6861df1d0e514cc46e41e9eb79a
7
- data.tar.gz: f5250c998ddde7236c7c0047fcb3c71d81d2c4b5252c215639d81feebc831e2b0058709a5052e9786dca1fdd623993994766f41e85fe311c2b58f9768dd1ff7b
6
+ metadata.gz: 99b3fc8ecfd9b0590d8d9be30f1e780c41b305b9ca174c3d67bbf71079750cec9c0cbf1ccd27997a5418f066c3caad14837e64ec5fdea224c49f992fe62d988b
7
+ data.tar.gz: fdfd7cd1ce1837915d0781dce310bed7647a724198643d57392ccee6e505f50edeb1f87276bb5d67d13618902853ccd0303d6e5769ce03356fd2cdb636584fcf
data/README.md CHANGED
@@ -85,15 +85,15 @@ You have two ways to include javascript files. First: in gem presents helper met
85
85
  * ajax_select2_init_header_tags
86
86
  * ajax_multi_select2_init_header_tags
87
87
 
88
- This helpers call `javascript_include_tag` and it is useful for initialize select2
88
+ These helpers call `javascript_include_tag` and it is useful for initialize select2
89
89
  scripts on a single page. Example of usage in a view:
90
90
 
91
91
  - static_select2_init_header_tags
92
92
 
93
93
  %div
94
- = select_tag :my_select, my_options_for_select, class: 'small'
94
+ = select2_tag :my_select, my_options_for_select, class: 'small'
95
95
 
96
- Second variant: include files in javascript asset. For this add the
96
+ Second variant: include files in javascript assets. For this add the
97
97
  following to your `app/assets/javascripts/application.js`:
98
98
 
99
99
  //= require auto_select2/static_select2
@@ -93,8 +93,7 @@ module AutoSelect2
93
93
  if item.respond_to?(:to_select2)
94
94
  item.to_select2
95
95
  else
96
- label_method = text_columns.split(/[\s,]+/).first
97
- label_method ||= :name
96
+ label_method = text_columns.to_s.split(/[\s,]+/).first || :name
98
97
  if item.respond_to?(label_method)
99
98
  { text: item.public_send(label_method), id: item.public_send(id_column) }
100
99
  else
@@ -1,3 +1,3 @@
1
1
  module AutoSelect2
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auto_select2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitriy Lisichkin
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-12-03 00:00:00.000000000 Z
12
+ date: 2014-12-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties