Skip to content

Commit d8e91fe

Browse files
author
Brian M Dube
committed
Update code reloading example for Rails 5.1.4
1 parent 5808de3 commit d8e91fe

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3375,6 +3375,22 @@ if Rails.env.development?
33753375
end
33763376
```
33773377

3378+
For Rails >= 5.1.4, change this:
3379+
3380+
```ruby
3381+
ActionDispatch::Callbacks.to_prepare do
3382+
api_reloader.execute_if_updated
3383+
end
3384+
```
3385+
3386+
to this:
3387+
3388+
```ruby
3389+
ActiveSupport::Reloader.to_prepare do
3390+
api_reloader.execute_if_updated
3391+
end
3392+
```
3393+
33783394
See [StackOverflow #3282655](http://stackoverflow.com/questions/3282655/ruby-on-rails-3-reload-lib-directory-for-each-request/4368838#4368838) for more information.
33793395

33803396
## Performance Monitoring

0 commit comments

Comments
 (0)