Automatically reload rails module

前端 未结 3 1239
再見小時候
再見小時候 2021-01-20 18:04

I\'m developing a ruby module that I include in my rails app. I want it to be reloaded automatically when it changes. I\'ve done extensive googling, and looked at the variou

3条回答
  •  不知归路
    2021-01-20 18:24

    I found how to do this:

    1. Make sure FooModule is in lib/foo_module.rb.
    2. Use require_dependency to require your external library in lib/foo_module.rb.

    These steps are both required, and no others are required.

提交回复
热议问题