simple_table 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/simple_table/table.rb +3 -4
- data/lib/simple_table/version.rb +1 -1
- metadata +4 -4
data/lib/simple_table/table.rb
CHANGED
@@ -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
|
data/lib/simple_table/version.rb
CHANGED
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:
|
4
|
+
hash: 15
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
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-
|
19
|
+
date: 2010-11-01 00:00:00 +01:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|