Skip to content

Commit f54bf12

Browse files
committed
Update InertiaRails
1 parent 8bcb57e commit f54bf12

File tree

5 files changed

+20
-97
lines changed

5 files changed

+20
-97
lines changed

Gemfile.lock

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ GEM
125125
activesupport (>= 6.1)
126126
i18n (1.14.7)
127127
concurrent-ruby (~> 1.0)
128-
inertia_rails (3.6.1)
128+
inertia_rails (3.7.0)
129129
railties (>= 6)
130130
io-console (0.8.0)
131131
irb (1.15.1)
@@ -138,7 +138,7 @@ GEM
138138
js-routes (2.3.5)
139139
railties (>= 5)
140140
sorbet-runtime
141-
json (2.10.1)
141+
json (2.10.2)
142142
kamal (2.5.3)
143143
activesupport (>= 7.0)
144144
base64 (~> 0.2)
@@ -170,7 +170,7 @@ GEM
170170
marcel (1.0.4)
171171
matrix (0.4.2)
172172
mini_mime (1.1.5)
173-
minitest (5.25.4)
173+
minitest (5.25.5)
174174
msgpack (1.8.0)
175175
mutex_m (0.3.0)
176176
net-imap (0.5.6)
@@ -188,19 +188,19 @@ GEM
188188
net-protocol
189189
net-ssh (7.3.0)
190190
nio4r (2.7.4)
191-
nokogiri (1.18.3-aarch64-linux-gnu)
191+
nokogiri (1.18.4-aarch64-linux-gnu)
192192
racc (~> 1.4)
193-
nokogiri (1.18.3-aarch64-linux-musl)
193+
nokogiri (1.18.4-aarch64-linux-musl)
194194
racc (~> 1.4)
195-
nokogiri (1.18.3-arm-linux-gnu)
195+
nokogiri (1.18.4-arm-linux-gnu)
196196
racc (~> 1.4)
197-
nokogiri (1.18.3-arm-linux-musl)
197+
nokogiri (1.18.4-arm-linux-musl)
198198
racc (~> 1.4)
199-
nokogiri (1.18.3-arm64-darwin)
199+
nokogiri (1.18.4-arm64-darwin)
200200
racc (~> 1.4)
201-
nokogiri (1.18.3-x86_64-linux-gnu)
201+
nokogiri (1.18.4-x86_64-linux-gnu)
202202
racc (~> 1.4)
203-
nokogiri (1.18.3-x86_64-linux-musl)
203+
nokogiri (1.18.4-x86_64-linux-musl)
204204
racc (~> 1.4)
205205
ostruct (0.6.1)
206206
parallel (1.26.3)
@@ -287,7 +287,7 @@ GEM
287287
rspec-mocks (~> 3.13)
288288
rspec-support (~> 3.13)
289289
rspec-support (3.13.2)
290-
rubocop (1.73.2)
290+
rubocop (1.74.0)
291291
json (~> 2.3)
292292
language_server-protocol (~> 3.17.0.2)
293293
lint_roller (~> 1.1.0)
@@ -298,7 +298,7 @@ GEM
298298
rubocop-ast (>= 1.38.0, < 2.0)
299299
ruby-progressbar (~> 1.7)
300300
unicode-display_width (>= 2.4.0, < 4.0)
301-
rubocop-ast (1.38.1)
301+
rubocop-ast (1.39.0)
302302
parser (>= 3.3.1.0)
303303
rubocop-performance (1.24.0)
304304
lint_roller (~> 1.1)
@@ -332,14 +332,14 @@ GEM
332332
activejob (>= 7.2)
333333
activerecord (>= 7.2)
334334
railties (>= 7.2)
335-
solid_queue (1.1.3)
335+
solid_queue (1.1.4)
336336
activejob (>= 7.1)
337337
activerecord (>= 7.1)
338338
concurrent-ruby (>= 1.3.1)
339339
fugit (~> 1.11.0)
340340
railties (>= 7.1)
341341
thor (~> 1.3.1)
342-
sorbet-runtime (0.5.11915)
342+
sorbet-runtime (0.5.11942)
343343
sqlite3 (2.6.0-aarch64-linux-gnu)
344344
sqlite3 (2.6.0-aarch64-linux-musl)
345345
sqlite3 (2.6.0-arm-linux-gnu)

app/frontend/routes/index.d.ts

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* @file Generated by js-routes 2.3.5. Based on Rails 8.0.1 routes of InertiaRailsShadcnStarter::Application.
3-
* @version 55dfb4269543325bcb55f29a6ad7bf187983935536d864260a546dc93b780ec1
2+
* @file Generated by js-routes 2.3.5. Based on Rails 8.0.2 routes of InertiaRailsShadcnStarter::Application.
3+
* @version 15856b6545f535f9daf72484affe6c4605b22d1f92abdc271f0818d80cb9b39a
44
* @see https://github.com/railsware/js-routes
55
*/
66
declare type Optional<T> = {
@@ -96,16 +96,6 @@ export const dashboardPath: ((
9696
options?: {format?: OptionalRouteParameter} & RouteOptions
9797
) => string) & RouteHelperExtras;
9898

99-
/**
100-
* Generates rails route to
101-
* /identity/email/edit(.:format)
102-
* @param {object | undefined} options
103-
* @returns {string} route path
104-
*/
105-
export const editIdentityEmailPath: ((
106-
options?: {format?: OptionalRouteParameter} & RouteOptions
107-
) => string) & RouteHelperExtras;
108-
10999
/**
110100
* Generates rails route to
111101
* /identity/password_reset/edit(.:format)
@@ -116,16 +106,6 @@ export const editIdentityPasswordResetPath: ((
116106
options?: {format?: OptionalRouteParameter} & RouteOptions
117107
) => string) & RouteHelperExtras;
118108

119-
/**
120-
* Generates rails route to
121-
* /identity/email(.:format)
122-
* @param {object | undefined} options
123-
* @returns {string} route path
124-
*/
125-
export const identityEmailPath: ((
126-
options?: {format?: OptionalRouteParameter} & RouteOptions
127-
) => string) & RouteHelperExtras;
128-
129109
/**
130110
* Generates rails route to
131111
* /identity/email_verification(.:format)
@@ -146,16 +126,6 @@ export const identityPasswordResetPath: ((
146126
options?: {format?: OptionalRouteParameter} & RouteOptions
147127
) => string) & RouteHelperExtras;
148128

149-
/**
150-
* Generates rails route to
151-
* /inertia-example(.:format)
152-
* @param {object | undefined} options
153-
* @returns {string} route path
154-
*/
155-
export const inertiaExamplePath: ((
156-
options?: {format?: OptionalRouteParameter} & RouteOptions
157-
) => string) & RouteHelperExtras;
158-
159129
/**
160130
* Generates rails route to
161131
* /identity/password_reset/new(.:format)

app/frontend/routes/index.js

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* @file Generated by js-routes 2.3.5. Based on Rails 8.0.1 routes of InertiaRailsShadcnStarter::Application.
3-
* @version 55dfb4269543325bcb55f29a6ad7bf187983935536d864260a546dc93b780ec1
2+
* @file Generated by js-routes 2.3.5. Based on Rails 8.0.2 routes of InertiaRailsShadcnStarter::Application.
3+
* @version 15856b6545f535f9daf72484affe6c4605b22d1f92abdc271f0818d80cb9b39a
44
* @see https://github.com/railsware/js-routes
55
*/
66
// eslint-disable-next-line
@@ -553,14 +553,6 @@ export const serialize = __jsr.serialize;
553553
*/
554554
export const dashboardPath = /*#__PURE__*/ __jsr.r({"format":{}}, [2,[7,"/"],[2,[6,"dashboard"],[1,[2,[8,"."],[3,"format"]]]]]);
555555

556-
/**
557-
* Generates rails route to
558-
* /identity/email/edit(.:format)
559-
* @param {object | undefined} options
560-
* @returns {string} route path
561-
*/
562-
export const editIdentityEmailPath = /*#__PURE__*/ __jsr.r({"format":{}}, [2,[7,"/"],[2,[6,"identity"],[2,[7,"/"],[2,[6,"email"],[2,[7,"/"],[2,[6,"edit"],[1,[2,[8,"."],[3,"format"]]]]]]]]]);
563-
564556
/**
565557
* Generates rails route to
566558
* /identity/password_reset/edit(.:format)
@@ -569,14 +561,6 @@ export const editIdentityEmailPath = /*#__PURE__*/ __jsr.r({"format":{}}, [2,[7,
569561
*/
570562
export const editIdentityPasswordResetPath = /*#__PURE__*/ __jsr.r({"format":{}}, [2,[7,"/"],[2,[6,"identity"],[2,[7,"/"],[2,[6,"password_reset"],[2,[7,"/"],[2,[6,"edit"],[1,[2,[8,"."],[3,"format"]]]]]]]]]);
571563

572-
/**
573-
* Generates rails route to
574-
* /identity/email(.:format)
575-
* @param {object | undefined} options
576-
* @returns {string} route path
577-
*/
578-
export const identityEmailPath = /*#__PURE__*/ __jsr.r({"format":{}}, [2,[7,"/"],[2,[6,"identity"],[2,[7,"/"],[2,[6,"email"],[1,[2,[8,"."],[3,"format"]]]]]]]);
579-
580564
/**
581565
* Generates rails route to
582566
* /identity/email_verification(.:format)
@@ -593,14 +577,6 @@ export const identityEmailVerificationPath = /*#__PURE__*/ __jsr.r({"format":{}}
593577
*/
594578
export const identityPasswordResetPath = /*#__PURE__*/ __jsr.r({"format":{}}, [2,[7,"/"],[2,[6,"identity"],[2,[7,"/"],[2,[6,"password_reset"],[1,[2,[8,"."],[3,"format"]]]]]]]);
595579

596-
/**
597-
* Generates rails route to
598-
* /inertia-example(.:format)
599-
* @param {object | undefined} options
600-
* @returns {string} route path
601-
*/
602-
export const inertiaExamplePath = /*#__PURE__*/ __jsr.r({"format":{}}, [2,[7,"/"],[2,[6,"inertia-example"],[1,[2,[8,"."],[3,"format"]]]]]);
603-
604580
/**
605581
* Generates rails route to
606582
* /identity/password_reset/new(.:format)

config/initializers/inertia_rails.rb

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,4 @@
33
InertiaRails.configure do |config|
44
config.version = ViteRuby.digest
55
config.encrypt_history = true
6-
# remove once https://github.com/inertiajs/inertia-rails/pull/196 is merged
7-
config.ssr_enabled = ENV.fetch("INERTIA_SSR_ENABLED", false)
8-
config.ssr_url = ENV.fetch("INERTIA_SSR_URL", "http://localhost:13714")
9-
end
10-
11-
# remove once https://github.com/inertiajs/inertia-rails/pull/199 is merged
12-
ActionController::Renderers.remove :inertia
13-
ActionController::Renderers.add :inertia do |component, options|
14-
if component.is_a?(Hash) && options[:props].nil?
15-
options[:props] = component
16-
component = true
17-
end
18-
InertiaRails::Renderer.new(
19-
component,
20-
self,
21-
request,
22-
response,
23-
method(:render),
24-
props: options[:props],
25-
view_data: options[:view_data],
26-
deep_merge: options[:deep_merge],
27-
encrypt_history: options[:encrypt_history],
28-
clear_history: options[:clear_history],
29-
).render
306
end

config/routes.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@
2121
resource :password, only: [:show, :update]
2222
resource :email, only: [:show, :update]
2323
resources :sessions, only: [:index]
24-
inertia :appearance
2524
end
2625

26+
inertia "settings/appearance" => "settings/appearance"
27+
2728
root "home#index"
2829

2930
# Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500.

0 commit comments

Comments
 (0)