Method: DataPact::ApplicationController#routes

Defined in:
app/controllers/data_pact/application_controller.rb

#routesObject



3
4
5
6
7
8
9
10
11
12
13
# File 'app/controllers/data_pact/application_controller.rb', line 3

def routes
  @routes = Rails.application.routes.routes.map do |route|
    {
      name: route.name,
      verb: route.verb,
      path: route.path.spec.to_s,
      format: route.defaults[:format],
      controller_action: [route.defaults[:controller], '#', route.defaults[:action]].join,
    }
  end
end