simple_form_auto_select2 0.0.1 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{app → lib/simple_form}/inputs/ajax_select2_input.rb +2 -7
- data/{app → lib/simple_form}/inputs/select2_input.rb +1 -1
- data/lib/simple_form_auto_select2/infectors/simple_form/inputs.rb +14 -0
- data/lib/simple_form_auto_select2/infectors/simple_form.rb +8 -0
- data/lib/simple_form_auto_select2/infectors.rb +6 -0
- data/lib/simple_form_auto_select2/version.rb +1 -1
- data/lib/simple_form_auto_select2.rb +2 -0
- metadata +7 -11
- data/.idea/.name +0 -1
- data/.idea/encodings.xml +0 -5
- data/.idea/misc.xml +0 -5
- data/.idea/modules.xml +0 -9
- data/.idea/scopes/scope_settings.xml +0 -5
- data/.idea/simple_form_auto_select2.iml +0 -50
- data/.idea/vcs.xml +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e74f5b45181a7abbef50e1ce4d5d73a1dda819c
|
4
|
+
data.tar.gz: 4939b094657dba6b9c485a4bef533268dd455c94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63623c72da9b75d9406c9c1930f4c316ce673cf7500c51bb24e363b165aba78fb2da2187d28f798c4f4888a5b6dbe391ede33a1538043d9ba9bfa187bef9f80b
|
7
|
+
data.tar.gz: 6995429835844225f84e52b5d9d2c9285cf62dba1d4acaf8cf848480877e73b2e719bc596d5d29a2debb7ef0f91837413b938d28bf0184ac2e64eea7d8d7ce7c
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class AjaxSelect2Input < SimpleForm::Inputs::StringInput
|
1
|
+
class SimpleForm::Inputs::AjaxSelect2Input < SimpleForm::Inputs::StringInput
|
2
2
|
extend ActiveSupport::Autoload
|
3
3
|
|
4
4
|
def input_html_options
|
@@ -27,11 +27,6 @@ class AjaxSelect2Input < SimpleForm::Inputs::StringInput
|
|
27
27
|
multiple_by_options? || multiple_by_association?
|
28
28
|
end
|
29
29
|
|
30
|
-
# def value
|
31
|
-
# val = object.send(association_primary_key)
|
32
|
-
# val.is_a?(Array) ? val.join(',') : val
|
33
|
-
# end
|
34
|
-
|
35
30
|
def multiple_by_association?
|
36
31
|
reflection && [ :has_many, :has_and_belongs_to_many ].include?(reflection.macro)
|
37
32
|
end
|
@@ -39,4 +34,4 @@ class AjaxSelect2Input < SimpleForm::Inputs::StringInput
|
|
39
34
|
def multiple_by_options?
|
40
35
|
options[:multiple] || (options[:input_html] && options[:input_html][:multiple])
|
41
36
|
end
|
42
|
-
end
|
37
|
+
end
|
@@ -1,5 +1,7 @@
|
|
1
1
|
require 'simple_form_auto_select2/version'
|
2
2
|
require 'simple_form_auto_select2/engine'
|
3
|
+
require 'simple_form_auto_select2/infectors'
|
4
|
+
SimpleForm::Inputs.send(:include, SimpleFormAutoSelect2::Infectors::SimpleForm::Inputs)
|
3
5
|
|
4
6
|
module SimpleFormAutoSelect2
|
5
7
|
extend ActiveSupport::Autoload
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_form_auto_select2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitriy Lisichkin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -116,20 +116,16 @@ extensions: []
|
|
116
116
|
extra_rdoc_files: []
|
117
117
|
files:
|
118
118
|
- .gitignore
|
119
|
-
- .idea/.name
|
120
|
-
- .idea/encodings.xml
|
121
|
-
- .idea/misc.xml
|
122
|
-
- .idea/modules.xml
|
123
|
-
- .idea/scopes/scope_settings.xml
|
124
|
-
- .idea/simple_form_auto_select2.iml
|
125
|
-
- .idea/vcs.xml
|
126
119
|
- Gemfile
|
127
120
|
- LICENSE
|
128
121
|
- README.md
|
129
|
-
-
|
130
|
-
-
|
122
|
+
- lib/simple_form/inputs/ajax_select2_input.rb
|
123
|
+
- lib/simple_form/inputs/select2_input.rb
|
131
124
|
- lib/simple_form_auto_select2.rb
|
132
125
|
- lib/simple_form_auto_select2/engine.rb
|
126
|
+
- lib/simple_form_auto_select2/infectors.rb
|
127
|
+
- lib/simple_form_auto_select2/infectors/simple_form.rb
|
128
|
+
- lib/simple_form_auto_select2/infectors/simple_form/inputs.rb
|
133
129
|
- lib/simple_form_auto_select2/version.rb
|
134
130
|
- simple_form_auto_select2.gemspec
|
135
131
|
homepage: https://github.com/tab10id/simple_form_auto_select2
|
data/.idea/.name
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
simple_form_auto_select2
|
data/.idea/encodings.xml
DELETED
data/.idea/misc.xml
DELETED
data/.idea/modules.xml
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<project version="4">
|
3
|
-
<component name="ProjectModuleManager">
|
4
|
-
<modules>
|
5
|
-
<module fileurl="file://$PROJECT_DIR$/.idea/simple_form_auto_select2.iml" filepath="$PROJECT_DIR$/.idea/simple_form_auto_select2.iml" />
|
6
|
-
</modules>
|
7
|
-
</component>
|
8
|
-
</project>
|
9
|
-
|
@@ -1,50 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<module type="RUBY_MODULE" version="4">
|
3
|
-
<component name="CompassSettings">
|
4
|
-
<option name="compassSupportEnabled" value="true" />
|
5
|
-
</component>
|
6
|
-
<component name="FacetManager">
|
7
|
-
<facet type="gem" name="Ruby Gem">
|
8
|
-
<configuration>
|
9
|
-
<option name="GEM_APP_ROOT_PATH" value="$MODULE_DIR$" />
|
10
|
-
<option name="GEM_APP_TEST_PATH" value="" />
|
11
|
-
<option name="GEM_APP_LIB_PATH" value="$MODULE_DIR$/lib" />
|
12
|
-
</configuration>
|
13
|
-
</facet>
|
14
|
-
</component>
|
15
|
-
<component name="NewModuleRootManager">
|
16
|
-
<content url="file://$MODULE_DIR$" />
|
17
|
-
<orderEntry type="jdk" jdkName="rbenv: 2.2.0" jdkType="RUBY_SDK" />
|
18
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
19
|
-
<orderEntry type="library" scope="PROVIDED" name="actionpack (v4.2.0, rbenv: 2.2.0) [gem]" level="application" />
|
20
|
-
<orderEntry type="library" scope="PROVIDED" name="actionview (v4.2.0, rbenv: 2.2.0) [gem]" level="application" />
|
21
|
-
<orderEntry type="library" scope="PROVIDED" name="activemodel (v4.2.0, rbenv: 2.2.0) [gem]" level="application" />
|
22
|
-
<orderEntry type="library" scope="PROVIDED" name="activesupport (v4.2.0, rbenv: 2.2.0) [gem]" level="application" />
|
23
|
-
<orderEntry type="library" scope="PROVIDED" name="auto_select2 (v0.3.2, rbenv: 2.2.0) [gem]" level="application" />
|
24
|
-
<orderEntry type="library" scope="PROVIDED" name="builder (v3.2.2, rbenv: 2.2.0) [gem]" level="application" />
|
25
|
-
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.8.2, rbenv: 2.2.0) [gem]" level="application" />
|
26
|
-
<orderEntry type="library" scope="PROVIDED" name="coffee-rails (v4.1.0, rbenv: 2.2.0) [gem]" level="application" />
|
27
|
-
<orderEntry type="library" scope="PROVIDED" name="coffee-script (v2.3.0, rbenv: 2.2.0) [gem]" level="application" />
|
28
|
-
<orderEntry type="library" scope="PROVIDED" name="coffee-script-source (v1.9.0, rbenv: 2.2.0) [gem]" level="application" />
|
29
|
-
<orderEntry type="library" scope="PROVIDED" name="erubis (v2.7.0, rbenv: 2.2.0) [gem]" level="application" />
|
30
|
-
<orderEntry type="library" scope="PROVIDED" name="execjs (v2.3.0, rbenv: 2.2.0) [gem]" level="application" />
|
31
|
-
<orderEntry type="library" scope="PROVIDED" name="i18n (v0.7.0, rbenv: 2.2.0) [gem]" level="application" />
|
32
|
-
<orderEntry type="library" scope="PROVIDED" name="json (v1.8.2, rbenv: 2.2.0) [gem]" level="application" />
|
33
|
-
<orderEntry type="library" scope="PROVIDED" name="loofah (v2.0.1, rbenv: 2.2.0) [gem]" level="application" />
|
34
|
-
<orderEntry type="library" scope="PROVIDED" name="mini_portile (v0.6.2, rbenv: 2.2.0) [gem]" level="application" />
|
35
|
-
<orderEntry type="library" scope="PROVIDED" name="minitest (v5.5.1, rbenv: 2.2.0) [gem]" level="application" />
|
36
|
-
<orderEntry type="library" scope="PROVIDED" name="nokogiri (v1.6.6.2, rbenv: 2.2.0) [gem]" level="application" />
|
37
|
-
<orderEntry type="library" scope="PROVIDED" name="rack (v1.6.0, rbenv: 2.2.0) [gem]" level="application" />
|
38
|
-
<orderEntry type="library" scope="PROVIDED" name="rack-test (v0.6.3, rbenv: 2.2.0) [gem]" level="application" />
|
39
|
-
<orderEntry type="library" scope="PROVIDED" name="rails-deprecated_sanitizer (v1.0.3, rbenv: 2.2.0) [gem]" level="application" />
|
40
|
-
<orderEntry type="library" scope="PROVIDED" name="rails-dom-testing (v1.0.5, rbenv: 2.2.0) [gem]" level="application" />
|
41
|
-
<orderEntry type="library" scope="PROVIDED" name="rails-html-sanitizer (v1.0.1, rbenv: 2.2.0) [gem]" level="application" />
|
42
|
-
<orderEntry type="library" scope="PROVIDED" name="railties (v4.2.0, rbenv: 2.2.0) [gem]" level="application" />
|
43
|
-
<orderEntry type="library" scope="PROVIDED" name="select2-rails (v3.5.9.3, rbenv: 2.2.0) [gem]" level="application" />
|
44
|
-
<orderEntry type="library" scope="PROVIDED" name="simple_form (v3.1.0, rbenv: 2.2.0) [gem]" level="application" />
|
45
|
-
<orderEntry type="library" scope="PROVIDED" name="thor (v0.19.1, rbenv: 2.2.0) [gem]" level="application" />
|
46
|
-
<orderEntry type="library" scope="PROVIDED" name="thread_safe (v0.3.4, rbenv: 2.2.0) [gem]" level="application" />
|
47
|
-
<orderEntry type="library" scope="PROVIDED" name="tzinfo (v1.2.2, rbenv: 2.2.0) [gem]" level="application" />
|
48
|
-
</component>
|
49
|
-
</module>
|
50
|
-
|