Skip to content

Commit

Permalink
Merge pull request #326 from y-yagi/fix_example_for_reload
Browse files Browse the repository at this point in the history
Fix an example for resetting the state every request
  • Loading branch information
flavorjones authored Dec 17, 2024
2 parents fd24cd2 + 3238300 commit 0301156
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ Call `Model.reload(true)` to force reload the data from disk.
In Rails, you can use this snippet. Please just note it resets the state every request, which may not always be desired.

```ruby
before_filter do
before_action do
[Model1, Model2, Model3].each { |m| m.reload(true) }
end
```
Expand Down

0 comments on commit 0301156

Please sign in to comment.