Sha256: 0d48a4e7a77865c9d38fcf9d640adc1cb8a31aea4cc594a67a15d865682b662d

Contents?: true

Size: 670 Bytes

Versions: 3

Compression:

Stored size: 670 Bytes

Contents

module ApiTaster
  class RoutesController < ApiTaster::ApplicationController
    before_filter :map_routes

    def index
      @routes = Route.grouped_routes
      @has_missing_definitions  = Route.missing_definitions.present?
      @has_obsolete_definitions = Route.obsolete_definitions.present?
    end

    def show
      @route  = Route.find(params[:id])
      @params = Route.params_for(@route)
    end

    def missing_definitions
      @missing_definitions = Route.missing_definitions
    end

    def obsolete_definitions
      @obsolete_definitions = Route.obsolete_definitions
    end

    private

    def map_routes
      Route.map_routes
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
api_taster-0.4.8 app/controllers/api_taster/routes_controller.rb
api_taster-0.4.7 app/controllers/api_taster/routes_controller.rb
api_taster-0.4.6 app/controllers/api_taster/routes_controller.rb