Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 5c0c0bc075
Fetching contributors…

Cannot retrieve contributors at this time

file 15 lines (13 sloc) 0.38 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
require 'rails/application/route_inspector'
require 'sextant/engine'
require 'rails/routes'

module Sextant
  def self.format_routes(routes = all_routes)
    inspector = Rails::Application::RouteInspector.new
    inspector.format(routes, ENV['CONTROLLER']).join "\n"
  end

  def self.all_routes
    Rails.application.reload_routes!
    Rails.application.routes.routes
  end
end
Something went wrong with that request. Please try again.