effective_bootstrap 0.4.4 → 0.4.5
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: c2469342de9d3e1a00a7bbda6ec5867dfcc246c3
|
4
|
+
data.tar.gz: 9f7a28c645d1ca83eb8ea50afe62f1fcb34948b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03514b33df32c0cb77d801e4f24e93f327723271554329b4fe7a08a2cf43d6fd871ec75b44a8af7998d13dbc402e323d33bf2ef0a03832c930442e9c9a51d5cb
|
7
|
+
data.tar.gz: 09e81df8639a8e1933be6237e60cd74ea030164255bcb116f24105716628e5d4efb4bca3ab731fe1096c5c68bebe0d87259e2ff24762887829030ef8e2da1f8c
|
@@ -254,7 +254,8 @@ module Effective
|
|
254
254
|
end
|
255
255
|
|
256
256
|
def value
|
257
|
-
|
257
|
+
@_value ||= (options.delete(:value) || options[:input]&.delete(:value))
|
258
|
+
@_value ||= (object.public_send(name) if object.respond_to?(name))
|
258
259
|
end
|
259
260
|
|
260
261
|
def unique_id(item = nil)
|
@@ -32,12 +32,11 @@ module Effective
|
|
32
32
|
|
33
33
|
checked = options[:input].delete(:checked)
|
34
34
|
selected = options[:input].delete(:selected)
|
35
|
-
passed_value = options[:input].delete(:value)
|
36
35
|
include_blank = options[:input].delete(:include_blank)
|
37
36
|
|
38
37
|
@collection_options = {
|
39
|
-
checked: [checked, selected,
|
40
|
-
selected: [selected, checked,
|
38
|
+
checked: [checked, selected, polymorphic_value, value].find { |value| value != nil },
|
39
|
+
selected: [selected, checked, polymorphic_value, value].find { |value| value != nil },
|
41
40
|
include_blank: include_blank
|
42
41
|
}.compact
|
43
42
|
end
|
@@ -13,15 +13,13 @@ module Effective
|
|
13
13
|
def build_input(&block)
|
14
14
|
content = if block_given?
|
15
15
|
capture(&block)
|
16
|
-
elsif options[:input][:value]
|
17
|
-
options[:input].delete(:value)
|
18
16
|
elsif resource_path
|
19
17
|
link_to(value, resource_path, title: value.to_s)
|
20
18
|
else
|
21
19
|
value
|
22
20
|
end
|
23
21
|
|
24
|
-
content_tag(:p, content, options[:input].except(:readonly, :required
|
22
|
+
content_tag(:p, content, options[:input].except(:readonly, :required).merge(id: tag_id))
|
25
23
|
end
|
26
24
|
|
27
25
|
def resource_path
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_bootstrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|