Skip to content

Instantly share code, notes, and snippets.

@mib32
Created September 21, 2015 18:09
Show Gist options
  • 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