diff --git a/.ruby-version b/.ruby-version index 7c32728..8f9174b 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.1.1 \ No newline at end of file +2.1.2 \ No newline at end of file diff --git a/app/controllers/swagger_yard/swagger_controller.rb b/app/controllers/swagger_yard/swagger_controller.rb index fdec9cc..d2ff04e 100644 --- a/app/controllers/swagger_yard/swagger_controller.rb +++ b/app/controllers/swagger_yard/swagger_controller.rb @@ -10,7 +10,7 @@ def index def show swagger_api = SwaggerYard.get_api("/#{params[:resource]}") - swagger_api.merge!("basePath" => request.base_url + SwaggerYard.api_path) if swagger_api["basePath"].blank? + swagger_api.merge!("basePath" => request.base_url + request.script_name + "/api") if swagger_api["basePath"].blank? render :json => swagger_api end diff --git a/app/views/swagger_yard/swagger/doc.html.erb b/app/views/swagger_yard/swagger/doc.html.erb index 4845cad..86808c8 100644 --- a/app/views/swagger_yard/swagger/doc.html.erb +++ b/app/views/swagger_yard/swagger/doc.html.erb @@ -20,7 +20,7 @@