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 +1 -1
- data/datagrid.gemspec +1 -1
- data/lib/datagrid/helper.rb +1 -1
- data/spec/datagrid/helper_spec.rb +2 -2
- data/spec/support/equal_to_dom.rb +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.3
|
data/datagrid.gemspec
CHANGED
data/lib/datagrid/helper.rb
CHANGED
@@ -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
|
64
|
+
<a href="ordered_grid%5Bdescending%5D=false&ordered_grid%5Border%5D=category" class="order asc">ASC</a> <a href="ordered_grid%5Bdescending%5D=true&ordered_grid%5Border%5D=category" class="order desc">DESC</a>
|
65
65
|
</div>
|
66
66
|
HTML
|
67
67
|
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: datagrid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.3.
|
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:
|
208
|
+
hash: 2656529442255327450
|
209
209
|
segments:
|
210
210
|
- 0
|
211
211
|
version: "0"
|