Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

exclude rails routes

  • Loading branch information...
commit a1561f51645abe90d64b867b5b9329cee89f19da 1 parent 1071c8b
@vast vast authored
Showing with 4 additions and 0 deletions.
  1. +1 −0  lib/api_taster/route.rb
  2. +3 −0  spec/route_spec.rb
View
1  lib/api_taster/route.rb
@@ -37,6 +37,7 @@ def normalise_routes!
route_set.routes.each do |route|
next if route.app.is_a?(Sprockets::Environment)
next if route.app == ApiTaster::Engine
+ next if route.defaults[:controller].to_s.starts_with?('rails/')
rack_app = discover_rack_app(route.app)
View
3  spec/route_spec.rb
@@ -32,6 +32,9 @@ module ApiTaster
end
mount Rails.application => '/app'
mount proc {} => '/rack_app'
+
+ get 'rails/info/properties' => 'rails/info#properties', :as => :rails_info_properties
+ get '/' => 'rails/welcome#index'
end
Rails.application.stub(:routes).and_return(routes)
Please sign in to comment.
Something went wrong with that request. Please try again.