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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ffe697ce639a9508875c0df9fed05f3869566397
4
- data.tar.gz: 8a8241ffebd3f4d83080c8f311a38a0f072dcae7
3
+ metadata.gz: 7e74f5b45181a7abbef50e1ce4d5d73a1dda819c
4
+ data.tar.gz: 4939b094657dba6b9c485a4bef533268dd455c94
5
5
  SHA512:
6
- metadata.gz: 35151725eeff8c74571e33de2d84626d3badd55084d49ac1d3575d17c457640e18f0b8d481eb1c9514f5fc812d2033e18243ba9c399e9a9a46f13bc5c99d0d2d
7
- data.tar.gz: ae2e9efd2eded98a231042e0b0b104fc7fc36400ee1b9e8f69642dd7c5ceae95573bf5d34d0ac2d5678314d7958be897df18060b76320be4bcc2445f7cc0f2b4
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,4 +1,4 @@
1
- class Select2Input < SimpleForm::Inputs::CollectionSelectInput
1
+ class SimpleForm::Inputs::Select2Input < SimpleForm::Inputs::CollectionSelectInput
2
2
  extend ActiveSupport::Autoload
3
3
 
4
4
  def input_html_options
@@ -0,0 +1,14 @@
1
+ module SimpleFormAutoSelect2
2
+ module Infectors
3
+ module SimpleForm
4
+ module Inputs
5
+ extend ActiveSupport::Concern
6
+
7
+ included do
8
+ autoload :Select2Input
9
+ autoload :AjaxSelect2Input
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,8 @@
1
+ module SimpleFormAutoSelect2
2
+ module Infectors
3
+ module SimpleForm
4
+ extend ActiveSupport::Autoload
5
+ autoload :Inputs
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,6 @@
1
+ module SimpleFormAutoSelect2
2
+ module Infectors
3
+ extend ActiveSupport::Autoload
4
+ autoload :SimpleForm
5
+ end
6
+ end
@@ -1,3 +1,3 @@
1
1
  module SimpleFormAutoSelect2
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.3'
3
3
  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.1
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-02-27 00:00:00.000000000 Z
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
- - app/inputs/ajax_select2_input.rb
130
- - app/inputs/select2_input.rb
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
@@ -1,5 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
4
- </project>
5
-
data/.idea/misc.xml DELETED
@@ -1,5 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectRootManager" version="2" project-jdk-name="rbenv: 1.9.3-p0" project-jdk-type="RUBY_SDK" />
4
- </project>
5
-
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,5 +0,0 @@
1
- <component name="DependencyValidationManager">
2
- <state>
3
- <option name="SKIP_IMPORT_STATEMENTS" value="false" />
4
- </state>
5
- </component>
@@ -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
-
data/.idea/vcs.xml DELETED
@@ -1,7 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
- </component>
6
- </project>
7
-