merge_params 0.4.1 → 0.4.2

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
  SHA1:
3
- metadata.gz: c06e2126cb5978d95685901f3c5d3e72e643f55a
4
- data.tar.gz: '005193093380694a32d4d9481a9029c80e0f4ac9'
3
+ metadata.gz: 01063ec1c21ddfa54b1e23325be36ce1fe86dcea
4
+ data.tar.gz: 7119ef72e5aa76760f1330efe684da9529a060ee
5
5
  SHA512:
6
- metadata.gz: 1c0b903c82caf2746944325ff2c8de02c4629b7568c90c312ce88c2321f17329d91963d12fc8fb96b2c6252dd394cd6708f98583356ff6ec8646f61240049802
7
- data.tar.gz: a363d8cb713b14e4cf3d3c85b679712a5c48caf94c64edced7fb077c7583541b1ce203e67ab888e8bdc32dc0a5f494c7d64affefe48e29ccf1aad0fa31f5ee6b
6
+ metadata.gz: 23b3730b8c340aa2b85b3b671287b15c106fd5dc25ac8839fea7764dd0f135fcddcef34a6180e2e5b25590e34f495c0d6ba75abb1fd959fc4fb07020b9bee071
7
+ data.tar.gz: cf7704f58636d5215cfd242a59ce0ba0341df05bf61b61dad6de76820a129ddb22f813c0eff4200512d0888837f488b3565d8066163bbe76391c431b357039f1
data/Changelog.md CHANGED
@@ -5,6 +5,11 @@ recommendations of [keepachangelog.com](http://keepachangelog.com/).
5
5
 
6
6
  ## (Unreleased)
7
7
 
8
+ ## 0.4.2 (2019-02-10)
9
+ - Fix `merge_url_for` to not pass on reserved options like only_path (which were only intended for
10
+ consumption by `url_for`) to `add_params`. It was adding it to the end of the URL, like
11
+ `only_path=true`.
12
+
8
13
  ## 0.4.1 (2019-02-08)
9
14
  - Fix issue with merge_params not merging nested hashes as expected (changed to
10
15
  use `deep_merge` instead of `merge`)
@@ -98,11 +98,12 @@ module MergeParams::Helpers
98
98
  # # as route params instead of query_params but are nonetheless already added to the url.
99
99
  # params_already_added = Rails.application.routes.recognize_path(url).merge(query_params_already_added)
100
100
  params_already_added = params_from_url(url)
101
- query_params_to_add = new_params.recursively_comparing(params_already_added).graph { |k,v, other|
102
- if v.is_a?(Hash) || v.nil? || other.nil?
103
- [k, v]
104
- end
105
- }
101
+ query_params_to_add = params_for_url_for(new_params).
102
+ recursively_comparing(params_already_added).graph { |k,v, other|
103
+ if v.is_a?(Hash) || v.nil? || other.nil?
104
+ [k, v]
105
+ end
106
+ }
106
107
  add_params(query_params_to_add, url)
107
108
  end
108
109
 
@@ -1,5 +1,5 @@
1
1
  module MergeParams
2
2
  def self.version
3
- "0.4.1"
3
+ "0.4.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: merge_params
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyler Rick
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-02-08 00:00:00.000000000 Z
11
+ date: 2019-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport