From 7c40f38c554bbf5f867a65c2a9aee230214777ad Mon Sep 17 00:00:00 2001 From: richie Date: Fri, 15 Jul 2016 15:32:32 -0700 Subject: [PATCH] Serve ui directly from mount root --- app/controllers/swagger_rails/swagger_ui_controller.rb | 4 ---- config/routes.rb | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/app/controllers/swagger_rails/swagger_ui_controller.rb b/app/controllers/swagger_rails/swagger_ui_controller.rb index dc055a7..525fa31 100644 --- a/app/controllers/swagger_rails/swagger_ui_controller.rb +++ b/app/controllers/swagger_rails/swagger_ui_controller.rb @@ -3,10 +3,6 @@ require 'json' module SwaggerRails class SwaggerUiController < ApplicationController - def root - redirect_to action: 'index' - end - def index swagger_root = SwaggerRails.config.resolve_swagger_root(request.env) swagger_root.concat('/') unless swagger_root.end_with?('/') diff --git a/config/routes.rb b/config/routes.rb index 24ff04d..8543722 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,4 +1,3 @@ SwaggerRails::Engine.routes.draw do - root to: 'swagger_ui#root' - get '/index.html', to: 'swagger_ui#index' + root to: 'swagger_ui#index' end