simple_table 0.0.7 → 0.0.8

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.
@@ -9,7 +9,7 @@ module SimpleTable
9
9
  @view = view
10
10
  @collection = collection
11
11
  @columns = []
12
- @collection_name = options.delete(:collection_name)
12
+ @collection_name = options.delete(:collection_name).to_s if options.key?(:collection_name)
13
13
 
14
14
  super(nil, options.reverse_merge(:id => collection_name, :class => "#{collection_name} list"))
15
15
 
@@ -38,12 +38,11 @@ module SimpleTable
38
38
  end
39
39
 
40
40
  def collection_class
41
- # @collection.first.class.base_class
42
41
  collection.first.class
43
42
  end
44
43
 
45
44
  def collection_name
46
- collection_name ||= collection_class.name.tableize.gsub('/', '_').gsub('rails_', '')
45
+ @collection_name ||= collection_class.name.tableize.gsub('/', '_').gsub('rails_', '')
47
46
  end
48
47
 
49
48
  def render
@@ -70,4 +69,4 @@ module SimpleTable
70
69
  names.map(&:titleize)
71
70
  end
72
71
  end
73
- end
72
+ end
@@ -1,3 +1,3 @@
1
1
  module SimpleTable
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_table
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 15
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 7
10
- version: 0.0.7
9
+ - 8
10
+ version: 0.0.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sven Fuchs
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-10-21 00:00:00 +02:00
19
+ date: 2010-11-01 00:00:00 +01:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency