Skip to content

Commit 27c4739

Browse files
authored
Merge branch 'master' into ke/prop-transformer
2 parents 43ec284 + 554f7ec commit 27c4739

File tree

19 files changed

+1503
-212
lines changed

19 files changed

+1503
-212
lines changed

.github/workflows/generators.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,7 @@ jobs:
2525
tailwind: [true, false]
2626
ruby: ['3.3']
2727
node: ['22']
28-
inertia_version: ['1.2.0', '1.3', '2.0']
29-
exclude:
30-
# 1.2.0 does not support typescript
31-
- typescript: true
32-
inertia_version: '1.2.0'
33-
# 1.2.0 doesn't support Svelte 5
34-
- framework: svelte
35-
inertia_version: '1.2.0'
28+
inertia_version: ['latest']
3629

3730
name: ${{ matrix.framework }} (TS:${{ matrix.typescript }}, TW:${{ matrix.tailwind }}, Inertia:${{ matrix.inertia_version }})
3831

.rubocop_todo.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config --exclude-limit 10000`
3-
# on 2025-07-25 08:41:37 UTC using RuboCop version 1.79.0.
3+
# on 2025-08-27 13:50:45 UTC using RuboCop version 1.80.1.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
@@ -81,14 +81,13 @@ Layout/SpaceInsideBlockBraces:
8181
- 'spec/inertia/error_sharing_spec.rb'
8282
- 'spec/inertia/request_spec.rb'
8383

84-
# Offense count: 56
84+
# Offense count: 54
8585
# This cop supports safe autocorrection (--autocorrect).
8686
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
8787
# SupportedStyles: space, no_space, compact
8888
# SupportedStylesForEmptyBraces: space, no_space
8989
Layout/SpaceInsideHashLiteralBraces:
9090
Exclude:
91-
- 'lib/inertia_rails/controller.rb'
9291
- 'spec/dummy/app/controllers/inertia_conditional_sharing_controller.rb'
9392
- 'spec/dummy/app/controllers/inertia_share_test_controller.rb'
9493
- 'spec/inertia/conditional_sharing_spec.rb'
@@ -198,7 +197,7 @@ Style/ColonMethodCall:
198197

199198
# Offense count: 1
200199
# This cop supports safe autocorrection (--autocorrect).
201-
# Configuration parameters: AutoCorrect, EnforcedStyle, AllowComments.
200+
# Configuration parameters: EnforcedStyle, AllowComments.
202201
# SupportedStyles: empty, nil, both
203202
Style/EmptyElse:
204203
Exclude:
@@ -212,7 +211,7 @@ Style/EmptyLiteral:
212211

213212
# Offense count: 2
214213
# This cop supports safe autocorrection (--autocorrect).
215-
# Configuration parameters: AutoCorrect, EnforcedStyle.
214+
# Configuration parameters: EnforcedStyle.
216215
# SupportedStyles: compact, expanded
217216
Style/EmptyMethod:
218217
Exclude:
@@ -404,7 +403,7 @@ Style/SoleNestedConditional:
404403
Exclude:
405404
- 'lib/inertia_rails/controller.rb'
406405

407-
# Offense count: 81
406+
# Offense count: 85
408407
# This cop supports safe autocorrection (--autocorrect).
409408
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
410409
# SupportedStyles: single_quotes, double_quotes
@@ -466,7 +465,7 @@ Style/TrailingCommaInHashLiteral:
466465
- 'spec/inertia/response_spec.rb'
467466
- 'spec/inertia/rspec_helper_spec.rb'
468467

469-
# Offense count: 32
468+
# Offense count: 36
470469
# This cop supports safe autocorrection (--autocorrect).
471470
# Configuration parameters: AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
472471
# URISchemes: http, https
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
module InertiaRails
22
class StaticController < InertiaRails.configuration.parent_controller.constantize
33
def static
4-
render inertia: params[:component]
4+
respond_to do |format|
5+
format.html { render inertia: params[:component] }
6+
end
57
end
68
end
79
end

docs/guide/configuration.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,19 @@ forcing a full page visit instead of an XHR visit on the next request.
130130

131131
See [assets versioning](/guide/asset-versioning).
132132

133+
### `always_include_errors_hash`
134+
135+
**Default**: `nil`
136+
**ENV**: `INERTIA_ALWAYS_INCLUDE_ERRORS_HASH`
137+
138+
@available_since rails=master
139+
140+
Whether to include an empty `errors` hash in the props when no validation errors are present.
141+
142+
When set to `true`, an empty `errors: {}` object will always be included in Inertia responses. When set to `false`, the `errors` key will be omitted when there are no errors. The default value `nil` currently behaves like `false` but shows a deprecation warning.
143+
144+
The default value will be changed to `true` in the next major version.
145+
133146
### `parent_controller`
134147

135148
**Default**: `'::ApplicationController'`

docs/guide/events.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ document.removeEventListener('inertia:start', startEventListener)
228228

229229
## Cancelling events
230230

231-
Some events, such as `before`, `invalid`, and `error`, support cancellation, allowing you to prevent Inertia's default behavior. Just like native events, the event will be cancelled if only one event listener calls `event.preventDefault()`.
231+
Some events, such as `before`, `exception`, and `invalid`, support cancellation, allowing you to prevent Inertia's default behavior. Just like native events, the event will be cancelled if only one event listener calls `event.preventDefault()`.
232232

233233
:::tabs key:frameworks
234234
== Vue

0 commit comments

Comments
 (0)