auto_select2 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of auto_select2 might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/auto_select2/select2_search_adapter/base.rb +1 -2
- data/lib/auto_select2/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4df7911483fb770cec21609c07b44cf9f3d331b
|
4
|
+
data.tar.gz: 7b55b2a104e128b848d1cb8fc197869944bac25b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
-
=
|
94
|
+
= select2_tag :my_select, my_options_for_select, class: 'small'
|
95
95
|
|
96
|
-
Second variant: include files in javascript
|
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
|
data/lib/auto_select2/version.rb
CHANGED
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.
|
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-
|
12
|
+
date: 2014-12-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|