table_helpers 0.8 → 0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/table_helpers.rb +3 -1
- metadata +4 -4
data/lib/table_helpers.rb
CHANGED
@@ -29,7 +29,7 @@ module TableHelpers
|
|
29
29
|
column_name = columns[j][0]
|
30
30
|
sort_columns = columns[j][1..columns[j].length-1]
|
31
31
|
|
32
|
-
if
|
32
|
+
if sort_columns.present?
|
33
33
|
if params[:order_by] == sort_columns.join(', ')
|
34
34
|
link = link_to(column_name, p.merge('order_by' => "#{sort_columns.join(' DESC, ') + ' DESC'}"), :class=> "sortdown")
|
35
35
|
elsif params[:order_by] == sort_columns.join(' DESC, ') + ' DESC'
|
@@ -43,6 +43,8 @@ module TableHelpers
|
|
43
43
|
else
|
44
44
|
headers.push("<th>%s</th>" % [link])
|
45
45
|
end
|
46
|
+
elsif column_name.present?
|
47
|
+
headers.push('<th>%s</th>' % column_name)
|
46
48
|
else
|
47
49
|
headers.push('<th></th>')
|
48
50
|
end
|
metadata
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: table_helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: "0.
|
8
|
+
- 9
|
9
|
+
version: "0.9"
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- "Damian Ba\xC4\x87kowski"
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2013-
|
17
|
+
date: 2013-06-12 00:00:00 Z
|
18
18
|
dependencies: []
|
19
19
|
|
20
20
|
description: The table_helpers library provides a simple helpers to create table lists with headers and presenting data in tables.
|