table_cloth 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,8 +30,13 @@ module TableCloth
30
30
  class << self
31
31
  def presenter(klass=nil)
32
32
  return @presenter = klass if klass
33
+ return @presenter if @presenter
33
34
 
34
- @presenter || (superclass.respond_to?(:presenter) ? superclass.presenter : NoPresenterError.new("No Presenter"))
35
+ if superclass.respond_to?(:presenter)
36
+ superclass.presenter
37
+ else
38
+ raise NoPresenterError, "No Presenter"
39
+ end
35
40
  end
36
41
 
37
42
  def column(*args, &block)
@@ -20,7 +20,7 @@ module TableCloth
20
20
  end
21
21
 
22
22
  def render_td(column, object)
23
- td_options = column.options.delete(:td_options) || {}
23
+ td_options = column.options[:td_options] || {}
24
24
  value = column.value(object, view_context, table)
25
25
 
26
26
  if value.is_a?(Array)
@@ -1,3 +1,3 @@
1
1
  module TableCloth
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: table_cloth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-17 00:00:00.000000000 Z
12
+ date: 2012-12-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec