Your self-hosted, globally interconnected microblogging community. https://joinmastodon.org/
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

14 lines
371 B

  1. if Rails.env.development?
  2. ActiveSupport::Dependencies.explicitly_unloadable_constants << 'Twitter::API'
  3. api_files = Dir[Rails.root.join('app', 'api', '**', '*.rb')]
  4. api_reloader = ActiveSupport::FileUpdateChecker.new(api_files) do
  5. Rails.application.reload_routes!
  6. end
  7. ActionDispatch::Callbacks.to_prepare do
  8. api_reloader.execute_if_updated
  9. end
  10. end