datagrid 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.2
1
+ 0.3.3
data/datagrid.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{datagrid}
8
- s.version = "0.3.2"
8
+ s.version = "0.3.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Bogdan Gusiev"]
@@ -57,7 +57,7 @@ module Datagrid
57
57
  content_tag(:div, :class => "order") do
58
58
  link_to(
59
59
  I18n.t("datagrid.table.order.asc", :default => "ASC"),
60
- url_for(grid.param_name => grid.attributes.merge(:order => column.name)),
60
+ url_for(grid.param_name => grid.attributes.merge(:order => column.name, :descending => false)),
61
61
  :class => "order asc"
62
62
  ) + " " + link_to(
63
63
  I18n.t("datagrid.table.order.desc", :default => "DESC"),
@@ -58,10 +58,10 @@ describe Datagrid::Helper do
58
58
  scope { Entry }
59
59
  column(:category)
60
60
  end
61
- report = OrderedGrid.new
61
+ report = OrderedGrid.new(:descending => true, :order => :category)
62
62
  subject.datagrid_order_for(report, report.column_by_name(:category)).should equal_to_dom(<<-HTML)
63
63
  <div class="order">
64
- <a href="ordered_grid%5Bdescending%5D=&amp;ordered_grid%5Border%5D=category" class="order asc">ASC</a> <a href="ordered_grid%5Bdescending%5D=true&amp;ordered_grid%5Border%5D=category" class="order desc">DESC</a>
64
+ <a href="ordered_grid%5Bdescending%5D=false&amp;ordered_grid%5Border%5D=category" class="order asc">ASC</a> <a href="ordered_grid%5Bdescending%5D=true&amp;ordered_grid%5Border%5D=category" class="order desc">DESC</a>
65
65
  </div>
66
66
  HTML
67
67
  end
@@ -20,7 +20,7 @@ class IncludeDom
20
20
  end
21
21
 
22
22
  def failure_message
23
- "Expected dom #{@matcher.inspect} to include #{@expectation.inspect}, but it wasn't"
23
+ "Expected dom \n#{@matcher.inspect}\n to include \n#{@expectation.inspect}\n, but it wasn't"
24
24
  end
25
25
  end
26
26
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: datagrid
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.3.2
5
+ version: 0.3.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Bogdan Gusiev
@@ -205,7 +205,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
205
205
  requirements:
206
206
  - - ">="
207
207
  - !ruby/object:Gem::Version
208
- hash: 1627043791496053267
208
+ hash: 2656529442255327450
209
209
  segments:
210
210
  - 0
211
211
  version: "0"