Sha256: 258973632a3381738d6d333d88dfb78a0320d9f42b2bcc081de9a44d832e15b5

Contents?: true

Size: 748 Bytes

Versions: 4

Compression:

Stored size: 748 Bytes

Contents

module ApiTaster
  class RoutesController < ApiTaster::ApplicationController
    before_filter :map_routes
    layout false, except: :index

    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)
      @comment = Route.comment_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

4 entries across 4 versions & 1 rubygems

Version Path
api_taster-0.8.4 app/controllers/api_taster/routes_controller.rb
api_taster-0.8.3 app/controllers/api_taster/routes_controller.rb
api_taster-0.8.2 app/controllers/api_taster/routes_controller.rb
api_taster-0.8.1 app/controllers/api_taster/routes_controller.rb