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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ed186963c980c1b8a756b21fb207d93817e6a1b09e0d39a5048af3cd44675bd
4
- data.tar.gz: ea3427c27fcd27836a6d1902b8c13452f0fe545eac441305bb4503a12b1b208f
3
+ metadata.gz: f1aabb31a760c3e8a7a3daebaaa15bc31bb048a6e32ed6ea0bff5a806bee36ff
4
+ data.tar.gz: 8fd9a0f9f7d84599be3a1451a8aaebf56fa591c977cb5d3d243d001caa291c7d
5
5
  SHA512:
6
- metadata.gz: 5aa25b5877ce491bbcdbab566bb05fe42b9cf204f587be3a380dce5244ea3d1a8d34220dd75ed2fb33f568329cf41e7abbc9a1d4f9fb1db49906ad773c27ee82
7
- data.tar.gz: a29d3f3548725d57b84ba350c449be5d2afe10c012ef0bfadacfbc4f98e9ad65e9128770ce932cfc5a5d1dbaa1b161c2a5d48a281dbacbc3ba3647e8c964bf5e
6
+ metadata.gz: 9496076ac639882e9f6efbfc081e86ca1ac2f45c4137b9aec6044089cf96bb0f2b6a3647ae442f0ba75ea910acdbc2a781700ff8888995f093a5045988364998
7
+ data.tar.gz: ed794daad6b98d873a98ceb996589b47dc9586b495e8911f71a6199a768a4a05bf7196bc2f9fa3a424b1b66e1000e41874f6242374383d3f122997dfee191ec8
@@ -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])
@@ -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
@@ -1,3 +1,3 @@
1
1
  module TableFor
2
- VERSION = "3.6.2"
2
+ VERSION = "3.7.0"
3
3
  end
@@ -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 controller params when generating the url" do
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.6.2
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-16 00:00:00.000000000 Z
11
+ date: 2019-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails