Skip to content

Commit e8c8be2

Browse files
authored
Merge pull request #155 from skryukov/various-doc-fixes
Various doc fixes
2 parents 1387f4c + 3e06e57 commit e8c8be2

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,15 @@ Add the `inertia_rails` gem to your Gemfile.
1313
gem 'inertia_rails'
1414
```
1515

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.
1717

1818
### Frontend
1919

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.
2221

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:
2423

25-
Examples:
24+
Reference these sample implementations:
2625

2726
- [React/Vite](https://github.com/BrandonShar/inertia-rails-template)
2827
- [React/Vite + SSR](https://github.com/ElMassimo/inertia-rails-ssr-template)
@@ -103,11 +102,11 @@ end
103102

104103
### Shared Data
105104

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.
107106

108107
```ruby
109108
class EventsController < ApplicationController
110-
# share syncronously
109+
# share synchronously
111110
inertia_share app_name: env['app.name']
112111

113112
# share lazily, evaluated at render time

docs/guide/manual-visits.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -588,23 +588,23 @@ The `only` option allows you to request a subset of the props (data) from the se
588588
```js
589589
import { router } from '@inertiajs/vue3'
590590

591-
router.visit('/users', { search: 'John' }, { only: ['users'] })
591+
router.visit('/users', { data: { search: 'John' }, only: ['users'] })
592592
```
593593

594594
== React
595595

596596
```js
597597
import { router } from '@inertiajs/react'
598598

599-
router.visit('/users', { search: 'John' }, { only: ['users'] })
599+
router.visit('/users', { data: { search: 'John' }, only: ['users'] })
600600
```
601601

602602
== Svelte 4|Svelte 5
603603

604604
```js
605605
import { router } from '@inertiajs/svelte'
606606

607-
router.visit('/users', { search: 'John' }, { only: ['users'] })
607+
router.visit('/users', { data: { search: 'John' }, only: ['users'] })
608608
```
609609

610610
:::

0 commit comments

Comments
 (0)