tablesorter 0.0.2 → 0.0.4

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.
@@ -1,3 +1,3 @@
1
1
  module Tablesorter
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -20,18 +20,14 @@ module Tablesorter
20
20
  css_classes << 'selected' if current_sort==sym
21
21
  css_classes << dir.to_s if current_sort==sym
22
22
 
23
- acc +
24
- '<th>' +
25
- "<a #{css_class_attribute(css_classes)} href='?" +
26
- options.merge(sort:sym.to_s, dir:dir).to_query +
27
- "'>" +
28
- "#{title}<span></span></a>" +
23
+ acc + '<th>' +
24
+ link_to("#{title} <span></span>".html_safe, url_for(params.merge({sort:sym.to_s, dir:dir})), css_class_attribute(css_classes)) +
29
25
  '</th>'
30
26
  end.html_safe
31
27
  end
32
28
 
33
29
  def css_class_attribute(css_classes)
34
- css_classes.present? ? "class='#{css_classes.join(' ')}'" : ''
30
+ css_classes.present? ? { class:"#{css_classes.join(' ')}" } : {}
35
31
  end
36
32
  end
37
33
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tablesorter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.4
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: 2013-03-03 00:00:00.000000000 Z
12
+ date: 2013-03-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails