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 +4 -4
- data/Changelog.md +5 -0
- data/lib/merge_params/helpers.rb +6 -5
- data/lib/merge_params/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01063ec1c21ddfa54b1e23325be36ce1fe86dcea
|
4
|
+
data.tar.gz: 7119ef72e5aa76760f1330efe684da9529a060ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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`)
|
data/lib/merge_params/helpers.rb
CHANGED
@@ -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
|
102
|
-
|
103
|
-
|
104
|
-
|
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
|
|
data/lib/merge_params/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2019-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|