table-for 3.6.2 → 3.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.rdoc +6 -0
- data/lib/table_for/base.rb +1 -0
- data/lib/table_for/version.rb +1 -1
- data/spec/table_for/base_spec.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1aabb31a760c3e8a7a3daebaaa15bc31bb048a6e32ed6ea0bff5a806bee36ff
|
4
|
+
data.tar.gz: 8fd9a0f9f7d84599be3a1451a8aaebf56fa591c977cb5d3d243d001caa291c7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9496076ac639882e9f6efbfc081e86ca1ac2f45c4137b9aec6044089cf96bb0f2b6a3647ae442f0ba75ea910acdbc2a781700ff8888995f093a5045988364998
|
7
|
+
data.tar.gz: ed794daad6b98d873a98ceb996589b47dc9586b495e8911f71a6199a768a4a05bf7196bc2f9fa3a424b1b66e1000e41874f6242374383d3f122997dfee191ec8
|
data/CHANGELOG.rdoc
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
3.7.0
|
2
|
+
* The page param is no longer included in the sort links generated for columns. This was pointed out
|
3
|
+
by {karwank}[https://github.com/karwank] as unexpected behavior. I am bumping the minor version of the
|
4
|
+
gem since this does change the default behavior, in case anybody is not expecting the default sort behavior to
|
5
|
+
have been updated.
|
6
|
+
|
1
7
|
3.6.2
|
2
8
|
* Added :sort_modes option to be able to specify sort_modes on a column by column basis (thanks {karwank}[https://github.com/karwank])
|
3
9
|
* Fixed bug preventing action and controller from being removed in pagination link params in some versions of Rails (thanks {karwank}[https://github.com/karwank])
|
data/lib/table_for/base.rb
CHANGED
@@ -117,6 +117,7 @@ module TableFor
|
|
117
117
|
parameters = view.params.merge(:order => order, :sort_mode => next_sort_mode)
|
118
118
|
parameters.delete(:action)
|
119
119
|
parameters.delete(:controller)
|
120
|
+
parameters.delete(:page)
|
120
121
|
if parameters.respond_to?(:to_unsafe_h)
|
121
122
|
parameters = parameters.to_unsafe_h
|
122
123
|
end
|
data/lib/table_for/version.rb
CHANGED
data/spec/table_for/base_spec.rb
CHANGED
@@ -138,8 +138,8 @@ describe TableFor::Base do
|
|
138
138
|
@base.header_sort_link(@column, :order => "first_name,last_name", :sortable => true).should eql "my link"
|
139
139
|
end
|
140
140
|
|
141
|
-
it "should remove the action and
|
142
|
-
@view.expects(:params).at_least_once.returns(:controller => "users", :action => "show")
|
141
|
+
it "should remove the action, controller, and page params when generating the url" do
|
142
|
+
@view.expects(:params).at_least_once.returns(:controller => "users", :action => "show", page: 50)
|
143
143
|
@view.expects(:link_to).with(@column.name.to_s.titleize, "?order=#{@column.name}&sort_mode=asc").returns "my link"
|
144
144
|
@base.header_sort_link(@column, :sortable => true) { @column.name.to_s.titleize }.should eql "my link"
|
145
145
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: table-for
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Hunter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|