assoc_whisperer 2.0.2 → 2.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca1ca5cce6d22e7055f31b9b78882841b189f566
|
4
|
+
data.tar.gz: 1c70ae286a41c2dc043d2c5473a4637c53cac426
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec3f05c46e88412964b0184c6ce8629accca9e8c54bb5ed363b3c810e4f0b69a8ad138f94c558f2117bca923512fc9d3b88e81d35efdafc5710cb5aa1d9cbbf4
|
7
|
+
data.tar.gz: 8724e1498fe5d2b3ac71a1a61f15e5bb6172b8010b3f78bbb32910d9e2f4d5b72da3abba55d101d413e033ccd74f00678b904449aaf339bb6a5be6f707292aa8
|
@@ -35,7 +35,7 @@ module ActionView
|
|
35
35
|
|
36
36
|
class FormBuilder
|
37
37
|
def whisperer(method, template, field_attrs={})
|
38
|
-
@template.
|
38
|
+
@template.whisperer @object_name, method, template, objectify_options(field_attrs)
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
@@ -50,7 +50,7 @@ module ActionView
|
|
50
50
|
name = if @whisp_template.opts[:name]
|
51
51
|
@whisp_template.opts[:name].to_s
|
52
52
|
else
|
53
|
-
"#{@method_name}_#{@
|
53
|
+
"#{@method_name}_#{@whisp_template.opts[:value]}"
|
54
54
|
end
|
55
55
|
@value_sanitized_method_name = name.sub(/\?$/, '')
|
56
56
|
end
|
@@ -7,7 +7,9 @@ module AssocWhisperer
|
|
7
7
|
def initialize(action, opts={})
|
8
8
|
@action = action[0]=='/' ? action : "#{AssocWhisperer.def_url}/#{action}"
|
9
9
|
@opts = opts
|
10
|
-
@opts[:
|
10
|
+
@opts[:value] = AssocWhisperer.def_value unless @opts[:value]
|
11
|
+
@opts[:text] = AssocWhisperer.def_text unless @opts[:text]
|
12
|
+
@opts[:button] = true if @opts[:button].nil?
|
11
13
|
end
|
12
14
|
|
13
15
|
def params(params)
|
@@ -20,10 +22,8 @@ module AssocWhisperer
|
|
20
22
|
@value = object_or_params[name]
|
21
23
|
@text = object_or_params["#{name}_txt"]
|
22
24
|
elsif object_or_params
|
23
|
-
value = @opts[:value]
|
24
|
-
text = @opts[:text]
|
25
|
-
@value = (object_or_params.send value if object_or_params.respond_to? value)
|
26
|
-
@text = (object_or_params.send text if object_or_params.respond_to? text)
|
25
|
+
@value = (object_or_params.send @opts[:value] if object_or_params.respond_to? @opts[:value])
|
26
|
+
@text = (object_or_params.send @opts[:text] if object_or_params.respond_to? @opts[:text])
|
27
27
|
else
|
28
28
|
@value = nil
|
29
29
|
@text = nil
|
@@ -64,7 +64,7 @@ module AssocWhisperer
|
|
64
64
|
end
|
65
65
|
|
66
66
|
def dropdown_button_tag
|
67
|
-
return '' unless @opts[:
|
67
|
+
return '' unless @opts[:button].is_a? TrueClass
|
68
68
|
"<span class=\"dropdown_button querying\">\u25BE</span>"
|
69
69
|
end
|
70
70
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: assoc_whisperer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ondřej Želazko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|