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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 56841eb8e3e3607969b5d1c47e3883491379b89e
4
- data.tar.gz: 0d4161bd6fc978cb2eb49798da66e3ec55733330
3
+ metadata.gz: 52755380a89261a4f1724ffbb24b987803044c2a
4
+ data.tar.gz: ce02ad83fec2f31699b53056b0d1e466fe40808e
5
5
  SHA512:
6
- metadata.gz: 25d64c35946e6f69017326178eb33e80d8cebf8bf10aaf58f55408fd46986eddcd59a98f8ce2e95f3ee65cd240763f57d18c9f3c7f16d7173c8fe9eddf07cffa
7
- data.tar.gz: b6aa5878acc666f2f5f17ac07230ab73c2c91032a0f9ac0f60bfa55236d2861da8f0e6ff44ba30244c8771879e25cf08e5aa07dbea88c6cd240905afcdb75f90
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
- Array(val).map do |v|
63
- format_value(v)
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
@@ -22,5 +22,5 @@
22
22
  #++
23
23
 
24
24
  module Tabulatr
25
- VERSION = "0.9.21"
25
+ VERSION = "0.9.22"
26
26
  end
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.21
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-07 00:00:00.000000000 Z
13
+ date: 2015-09-09 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails