File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -13,16 +13,15 @@ Add the `inertia_rails` gem to your Gemfile.
13
13
gem ' inertia_rails'
14
14
```
15
15
16
- For more instructions, see [ Server-side setup] ( https://inertia-rails.netlify.app /guide/server-side-setup.html ) .
16
+ Follow the complete [ Server-side setup] ( https://inertia-rails.dev /guide/server-side-setup ) in the official documentation .
17
17
18
18
### Frontend
19
19
20
- We are discussing on bringing official docs for Inertia Rails to this repo, as
21
- the [ official docs] ( https://inertiajs.com/client-side-setup ) are specific to Laravel.
20
+ Follow the [ Client-side setup] ( https://inertia-rails.dev/guide/client-side-setup ) guide for detailed configuration steps.
22
21
23
- In the meantime, you can refer to the community-maintained [ Client-side setup ] ( https://inertia-rails.netlify.app/guide/client-side-setup.html ) .
22
+ ### Example Projects:
24
23
25
- Examples :
24
+ Reference these sample implementations :
26
25
27
26
- [ React/Vite] ( https://github.com/BrandonShar/inertia-rails-template )
28
27
- [ React/Vite + SSR] ( https://github.com/ElMassimo/inertia-rails-ssr-template )
@@ -103,11 +102,11 @@ end
103
102
104
103
### Shared Data
105
104
106
- If you have data that you want to be provided as a prop to every component (a common use-case is information about the authenticated user) you can use the ` shared_data ` controller method.
105
+ If you have data that you want to be provided as a prop to every component (a common use-case is information about the authenticated user) you can use the ` inertia_share ` controller method.
107
106
108
107
``` ruby
109
108
class EventsController < ApplicationController
110
- # share syncronously
109
+ # share synchronously
111
110
inertia_share app_name: env[' app.name' ]
112
111
113
112
# share lazily, evaluated at render time
Original file line number Diff line number Diff line change @@ -588,23 +588,23 @@ The `only` option allows you to request a subset of the props (data) from the se
588
588
``` js
589
589
import { router } from ' @inertiajs/vue3'
590
590
591
- router .visit (' /users' , { search: ' John' }, { only: [' users' ] })
591
+ router .visit (' /users' , { data : { search: ' John' }, only: [' users' ] })
592
592
```
593
593
594
594
== React
595
595
596
596
``` js
597
597
import { router } from ' @inertiajs/react'
598
598
599
- router .visit (' /users' , { search: ' John' }, { only: [' users' ] })
599
+ router .visit (' /users' , { data : { search: ' John' }, only: [' users' ] })
600
600
```
601
601
602
602
== Svelte 4|Svelte 5
603
603
604
604
``` js
605
605
import { router } from ' @inertiajs/svelte'
606
606
607
- router .visit (' /users' , { search: ' John' }, { only: [' users' ] })
607
+ router .visit (' /users' , { data : { search: ' John' }, only: [' users' ] })
608
608
```
609
609
610
610
:::
You can’t perform that action at this time.
0 commit comments