inertia_rails 3.21.0 → 3.21.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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e75f704d4ac9af2da022ca9e0fb08f2954820e15095b8845809af1fc2b3470fa
|
|
4
|
+
data.tar.gz: 5ac24d6b30235de6c66f5bab59eb526e72804df26cb265c3894d214fbfd7fa98
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ed6bd7549422be3fffff41dfaf41502ea8d6850f23a408db31616b29ef7d1fecf3c64e74a46d6a425d80bc2c70161402b92ad25b560691ec9ef36f31403d1dba
|
|
7
|
+
data.tar.gz: 1154a428ebd8ffd146317e7aa98b996337ae445fa5f4197dac07491837b2f00d8ba13562e621b701725bebf40243a05eaf74775bf67fdef85d3ab0b008b1c1fb
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [3.21.1] - 2026-05-19
|
|
10
|
+
|
|
11
|
+
* Specify initializer run order for middleware insertion to avoid frozen middleware stack errors on Rails 8.1+ (@julik)
|
|
12
|
+
* Set an explicit `formats: :html` when rendering Inertia responses (@agrobbin)
|
|
13
|
+
* Use `params.expect` instead of `params.require(...).permit(...)` in scaffold generator and docs (@tyrro)
|
|
14
|
+
* Add railsfullstack.com to Awesome page (@code-creativeapps)
|
|
15
|
+
|
|
9
16
|
## [3.21.0] - 2026-04-14
|
|
10
17
|
|
|
11
18
|
* Skip excluded hash props on partial reloads (@erickreutz)
|
|
@@ -74,6 +74,8 @@ class <%= controller_class_name %>Controller < <%= parent_controller %>
|
|
|
74
74
|
def <%= "#{singular_table_name}_params" %>
|
|
75
75
|
<%- if attributes_names.empty? -%>
|
|
76
76
|
params.fetch(:<%= singular_table_name %>, {})
|
|
77
|
+
<%- elsif Rails::VERSION::MAJOR >= 8 -%>
|
|
78
|
+
params.expect(<%= singular_table_name %>: [<%= permitted_params %>])
|
|
77
79
|
<%- else -%>
|
|
78
80
|
params.require(:<%= singular_table_name %>).permit(<%= permitted_params %>)
|
|
79
81
|
<%- end -%>
|
data/lib/inertia_rails/engine.rb
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
module InertiaRails
|
|
4
4
|
class Engine < ::Rails::Engine
|
|
5
|
-
initializer 'inertia_rails.configure_rails_initialization' do |app|
|
|
5
|
+
initializer 'inertia_rails.configure_rails_initialization', before: :build_middleware_stack do |app|
|
|
6
6
|
app.middleware.use ::InertiaRails::Middleware
|
|
7
7
|
end
|
|
8
8
|
|
|
@@ -56,10 +56,20 @@ module InertiaRails
|
|
|
56
56
|
ssr = @configuration.ssr_enabled && ssr_render
|
|
57
57
|
if ssr
|
|
58
58
|
@controller.instance_variable_set('@_inertia_ssr_head', ssr['head'].join.html_safe)
|
|
59
|
-
@render_method.call
|
|
59
|
+
@render_method.call(
|
|
60
|
+
html: ssr['body'].html_safe,
|
|
61
|
+
layout: layout,
|
|
62
|
+
locals: @view_data.merge(page: page),
|
|
63
|
+
formats: :html
|
|
64
|
+
)
|
|
60
65
|
else
|
|
61
66
|
@controller.instance_variable_set('@_inertia_page', page)
|
|
62
|
-
@render_method.call
|
|
67
|
+
@render_method.call(
|
|
68
|
+
template: 'inertia',
|
|
69
|
+
layout: layout,
|
|
70
|
+
locals: @view_data.merge(page: page),
|
|
71
|
+
formats: :html
|
|
72
|
+
)
|
|
63
73
|
end
|
|
64
74
|
end
|
|
65
75
|
end
|