spammable.rb
307 Bytes
-
Use ActionDispatch::Reloader.to_prepare instead of Rails.configuration.to_prepare. The latter runs the block only once and is not adequate for code that are reloaded upon files changes on each request. As extensions may touch on helpers and controllers, the former suits well. Besides, filters must be loaded after all plugins' extensions, as controllers and helpers needs the "final" code to execute properly. The production behaviour don't change as the code is not reloaded.