blocks 1.2.4 → 1.2.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -55,8 +55,9 @@
55
55
  <% end %>
56
56
 
57
57
  <%= table.define :header_sortable_link do |options| %>
58
+ <% order = options[:order] ? options[:order].to_s : options[:column].name.to_s %>
58
59
  <% label = (options[:label] ? options[:label] : options[:column].name.to_s.titleize) %>
59
- <% sort_mode = ((params[:order] != options[:order].to_s or params[:sort_mode] == "desc") ? "asc" : "desc") %>
60
+ <% sort_mode = ((params[:order] != order or params[:sort_mode] == "desc") ? "asc" : "desc") %>
60
61
  <% parameters = params.merge({:order => (options[:order] ? options[:order] : options[:column].name), :sort_mode => sort_mode}) %>
61
62
  <% parameters.delete(:action); parameters.delete(:controller) %>
62
63
  <% url = options[:sort_url] ? options[:sort_url] : "" %>
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: blocks
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.2.4
5
+ version: 1.2.5
6
6
  platform: ruby
7
7
  authors:
8
8
  - Andrew Hunter