Skip to content

Commit 56044fd

Browse files
authored
Update readme to address Lazy block syntax (#135)
The InertiaRails::Lazy object in addition to passing a lambda or proc via a positional argument also accepts a block argument. This is another idiomatic to pass proc-like behavior in Ruby and should be documented as well.
1 parent 4873804 commit 56044fd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ On the front end, Inertia supports the concept of "partial reloads" where only t
182182

183183
```ruby
184184
inertia_share some_data: InertiaRails.lazy(lambda { some_very_slow_method })
185+
186+
# Using a Ruby block syntax
187+
inertia_share some_data: InertiaRails.lazy { some_very_slow_method }
185188
```
186189

187190
### Routing

0 commit comments

Comments
 (0)