volt-chosen 0.1.1 → 0.1.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 +4 -4
- data/app/chosen/controllers/main_controller.rb +7 -8
- data/lib/volt/chosen/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06d35b13d5619054f8dbf8af14955776265e4768
|
4
|
+
data.tar.gz: d1a4220f48199238cc2aed9d425e0c5050be4b2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0f6dc7bb6e3cab817103e557f672630c110ae02a84ec9c086e2e844bdd269ff7a9fd792089b7a1cee3937319b509749b4f14f951976baf6efecf36a355ef3fe
|
7
|
+
data.tar.gz: 9178bd07bc7828f74a55e7e5d4792271f54ae64e6aad7b1130081d54cc01763ceba0a3949a79e4d74d118477ce5f03d805e182bae8a0b4223c8a03c91cd71175
|
@@ -10,22 +10,21 @@ module Chosen
|
|
10
10
|
reactive_accessor :options
|
11
11
|
|
12
12
|
def setup_field
|
13
|
-
# Default to text fields
|
14
|
-
if attrs.respond_to?(:type)
|
15
|
-
@type = attrs.type
|
16
|
-
else
|
17
|
-
@type = 'text'
|
18
|
-
end
|
19
|
-
|
20
13
|
unless attrs.value_last_method
|
21
14
|
field_type = self.class.to_s.underscore.gsub(/[_]Controller$/, '')
|
22
|
-
raise "a <:
|
15
|
+
raise "a <:chosen tag was used without passing a value attribute"
|
23
16
|
end
|
24
17
|
|
25
18
|
# Get the name of the field by looking at the method scope
|
26
19
|
@field_name = attrs.value_last_method.gsub(/^[_]/, '')
|
27
20
|
end
|
28
21
|
|
22
|
+
# Set the model to attrs.options so that we don't render the view until
|
23
|
+
# the promise passed to attrs.options resolves.
|
24
|
+
def index
|
25
|
+
self.model = attrs.options
|
26
|
+
end
|
27
|
+
|
29
28
|
# Currently catches the 'change' event and re-raises it as chosen:changed due
|
30
29
|
# to a framework conflict that was throwing an error.
|
31
30
|
# See related issue:
|
data/lib/volt/chosen/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: volt-chosen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Hale
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: volt
|
@@ -256,7 +256,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
256
256
|
version: '0'
|
257
257
|
requirements: []
|
258
258
|
rubyforge_project:
|
259
|
-
rubygems_version: 2.4.
|
259
|
+
rubygems_version: 2.4.5.1
|
260
260
|
signing_key:
|
261
261
|
specification_version: 4
|
262
262
|
summary: Volt bindings for Chosen, the JS library for making long, unwieldy select
|
@@ -280,4 +280,3 @@ test_files:
|
|
280
280
|
- spec/integration/sample_integration_spec.rb
|
281
281
|
- spec/sample_spec.rb
|
282
282
|
- spec/spec_helper.rb
|
283
|
-
has_rdoc:
|