Skip to content

Instantly share code, notes, and snippets.

@mib32
Created September 21, 2015 18:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mib32/cac21dc9ef7678d98af3 to your computer and use it in GitHub Desktop.
Save mib32/cac21dc9ef7678d98af3 to your computer and use it in GitHub Desktop.
paths = Dir[Rails.root.join("config/routes/**/*.rb")]
updater = ActiveSupport::FileUpdateChecker.new(paths) { Rails.application.routes_reloader.reload!; Rails.logger.debug('shita') }
Rails.application.configure do
config.to_prepare do
puts 'updated status: ' + updater.updated?.to_s
Rails.logger.debug('shita')
updater.execute_if_updated
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment