mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 14:44:47 +02:00
Remove unneeded code
This doesn't seem to affect anything. Removes deprecation message when used with Rails 5.0. DEPRECATION WARNING: to_prepare is deprecated and will be removed from Rails 5.1 (use ActiveSupport::Reloader.to_prepare instead) (called from <top (required)> at /media/sf_registry/config/initializers/reload_api.rb:8)
This commit is contained in:
parent
6fb8767aef
commit
a76ab87d21
1 changed files with 0 additions and 11 deletions
|
@ -1,11 +0,0 @@
|
|||
if Rails.env.development?
|
||||
ActiveSupport::Dependencies.explicitly_unloadable_constants << 'Repp::API'
|
||||
|
||||
api_files = Dir[Rails.root.join('app', 'api', '**', '*.rb')]
|
||||
api_reloader = ActiveSupport::FileUpdateChecker.new(api_files) do
|
||||
Rails.application.reload_routes!
|
||||
end
|
||||
ActionDispatch::Callbacks.to_prepare do
|
||||
api_reloader.execute_if_updated
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue