hungryform 0.0.10 → 0.0.11
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd121fa51d237a9aa98ceaccb34d097b1dcda71c
|
4
|
+
data.tar.gz: 0b7015d45bc45feec5a378932407b331d69346cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 611492f408704f5447aaed13235a75ffda2f28e4f9683c5869c596ae54fa702ccf5de565edb49011a17175176c99b9aa15ef89b005e5dbd40c2547479270dc46
|
7
|
+
data.tar.gz: 7ee7a69c06e99581f8eb4b6f31ea8e8cfbe270d74fc9c3d3661763c372385b42c989e7935035ec6311f7312042755d96299967a7f8e866b086c112202bc43c62
|
@@ -16,12 +16,12 @@ module HungryForm
|
|
16
16
|
# Check if all of the values from the resolver params are present
|
17
17
|
# in the options.
|
18
18
|
def acceptable_values?
|
19
|
-
|
19
|
+
options_s_keys = options.keys.map(&:to_s)
|
20
20
|
|
21
21
|
if @attributes[:multiple] && resolver.params[name].respond_to?(:map)
|
22
|
-
(resolver.params[name].map(&:
|
22
|
+
(resolver.params[name].map(&:to_s) - options_s_keys).empty?
|
23
23
|
else
|
24
|
-
|
24
|
+
options_s_keys.include?(resolver.params[name].to_s)
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
data/lib/hungryform/version.rb
CHANGED
data/spec/form_spec.rb
CHANGED
@@ -38,14 +38,6 @@ describe HungryForm do
|
|
38
38
|
end
|
39
39
|
|
40
40
|
describe ".configure" do
|
41
|
-
it "sets a new views prefix" do
|
42
|
-
HungryForm.configure do |config|
|
43
|
-
config.views_prefix = '/new/prefix'
|
44
|
-
end
|
45
|
-
|
46
|
-
expect(HungryForm.configuration.views_prefix).to eq '/new/prefix'
|
47
|
-
end
|
48
|
-
|
49
41
|
it "configures default element options" do
|
50
42
|
HungryForm.configure do |config|
|
51
43
|
config.text_field my_attr: 100
|