tabulatr2 0.9.21 → 0.9.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tabulatr/renderer/column.rb +7 -3
- data/lib/tabulatr/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52755380a89261a4f1724ffbb24b987803044c2a
|
4
|
+
data.tar.gz: ce02ad83fec2f31699b53056b0d1e466fe40808e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 453921fa7ad6d5087e299d926fbbf4b7e4a097e01a4009e6e7f207ec081b7178522fd705e023242a746dcc7df70b9c85d39cf3645956211af71a353854c9b9b8
|
7
|
+
data.tar.gz: 72f5eb56c0520a8d3a2e44b43497f8d4de4aaec5a3ed2256dfd0e302e34f94d6534285d6fd6436e97a2522592476a54f23bb9b617dd77d1089c6b052b70267a8
|
@@ -59,8 +59,12 @@ class Tabulatr::Renderer::Column
|
|
59
59
|
def value_for(record, view)
|
60
60
|
val = principal_value(record, view)
|
61
61
|
if self.col_options.format.present?
|
62
|
-
|
63
|
-
|
62
|
+
if val.respond_to?(:to_ary)
|
63
|
+
val.map do |v|
|
64
|
+
format_value(v, view)
|
65
|
+
end
|
66
|
+
else
|
67
|
+
format_value(val, view)
|
64
68
|
end
|
65
69
|
else
|
66
70
|
val
|
@@ -104,7 +108,7 @@ class Tabulatr::Renderer::Column
|
|
104
108
|
end
|
105
109
|
end
|
106
110
|
|
107
|
-
def format_value(value)
|
111
|
+
def format_value(value, view)
|
108
112
|
case self.col_options.format
|
109
113
|
when Symbol then view.send(col_options.format, value)
|
110
114
|
when String then col_options.format % value
|
data/lib/tabulatr/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tabulatr2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Horn
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-09-
|
13
|
+
date: 2015-09-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|