2018-05-21 20:03:46 +00:00
|
|
|
if Rails.env.development?
|
|
|
|
ActiveSupport::Dependencies.explicitly_unloadable_constants << 'Houdini::V1'
|
|
|
|
|
|
|
|
api_files = Dir[Rails.root.join('app', 'api', '**', '*.rb')]
|
|
|
|
api_reloader = ActiveSupport::FileUpdateChecker.new(api_files) do
|
|
|
|
Rails.application.reload_routes!
|
|
|
|
end
|
2019-07-27 12:40:08 +00:00
|
|
|
ActiveSupport::Reloader.to_prepare do
|
2018-05-21 20:03:46 +00:00
|
|
|
api_reloader.execute_if_updated
|
|
|
|
end
|
2019-07-27 12:40:08 +00:00
|
|
|
end
|