inertia_rails-contrib 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eff1b41b96c46c48c582218d5a3337a26f7e6ee5bb94a1bf32ddca65d86ff8d9
4
- data.tar.gz: 1d6ffdd2a0aeb3de9f90e364a260f53a80f14b98a4d0a8c685c5181b9132eb39
3
+ metadata.gz: f77e8914c1e11ac5847e64a61772d3176414c0f65d340b6d84ea3b7357cf4bae
4
+ data.tar.gz: acc52c1ab4dcb9e3ec54082edc225cebc9705bfe53fd6d041d3a50e4a1d194d6
5
5
  SHA512:
6
- metadata.gz: 757b700b44d096aef10748596026b81f3b7fb337ce894ec8e877f5d1d0994a925e56c8541062593177dd32e2c3d8bbd2970a77b48d9fb4c456ecd242f81a806a
7
- data.tar.gz: 2edff2c7ebfcd93b35bb130d3166a3aba3be16fea99bb5c4113049e54033e4004c05c6887c7850abe3d54ea5b34c7737747917a4795441cc5477caeed217c0d5
6
+ metadata.gz: f685a777dc31ed4ad89d23f68842f317db43e8aced219619a59b3eb79d26127db9c1179152f9cf22889c3024131c16c08bb87186ea7638da9d549e56488b9868
7
+ data.tar.gz: a257ce8daa077ad5ed337846eb48f6cde2de0b9b15176122f953527cefa858151a7245506a5dba2f3caba9d762450e67f0b4ac0ddab1a637709b38ccd7c02551
data/CHANGELOG.md CHANGED
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning].
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.5.1] - 2025-07-31
11
+
12
+ Fixed:
13
+
14
+ - Fix params mismatch error when base URL uses other param names ([@skryukov])
15
+
16
+
10
17
  ## [0.5.0] - 2025-06-11
11
18
 
12
19
  Added:
@@ -84,7 +91,8 @@ Added:
84
91
  [@Shaglock]: https://github.com/Shaglock
85
92
  [@skryukov]: https://github.com/skryukov
86
93
 
87
- [Unreleased]: https://github.com/skryukov/inertia_rails-contrib/compare/v0.5.0...HEAD
94
+ [Unreleased]: https://github.com/skryukov/inertia_rails-contrib/compare/v0.5.1...HEAD
95
+ [0.5.1]: https://github.com/skryukov/inertia_rails-contrib/compare/v0.5.0...v0.5.1
88
96
  [0.5.0]: https://github.com/skryukov/inertia_rails-contrib/compare/v0.4.0...v0.5.0
89
97
  [0.4.0]: https://github.com/skryukov/inertia_rails-contrib/compare/v0.3.0...v0.4.0
90
98
  [0.3.0]: https://github.com/skryukov/inertia_rails-contrib/compare/v0.2.2...v0.3.0
@@ -34,23 +34,19 @@ module InertiaRailsContrib
34
34
  end
35
35
 
36
36
  def render_base_url
37
- original_env = Rack::MockRequest.env_for(
38
- base_url,
39
- method: @request.method,
40
- params: @request.params
41
- )
37
+ original_env = Rack::MockRequest.env_for(base_url)
42
38
  @request.each_header do |k, v|
43
39
  original_env[k] ||= v
44
40
  end
45
41
 
46
- original_request = ActionDispatch::Request.new(original_env)
42
+ request_to_base = ActionDispatch::Request.new(original_env)
47
43
 
48
- path = ActionDispatch::Journey::Router::Utils.normalize_path(original_request.path_info)
49
- Rails.application.routes.recognize_path_with_request(original_request, path, {})
50
- controller = original_request.controller_class.new
51
- controller.request = @request
44
+ path = ActionDispatch::Journey::Router::Utils.normalize_path(request_to_base.path_info)
45
+ Rails.application.routes.recognize_path_with_request(request_to_base, path, {})
46
+ controller = request_to_base.controller_class.new
47
+ controller.request = request_to_base
52
48
  controller.response = @response
53
- controller.process(original_request.path_parameters[:action])
49
+ controller.process(request_to_base.path_parameters[:action])
54
50
  end
55
51
  end
56
52
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module InertiaRailsContrib
4
- VERSION = "0.5.0"
4
+ VERSION = "0.5.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inertia_rails-contrib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Svyatoslav Kryukov