From d92abc56ac0b9e830f5a798f2a3e491b166296d5 Mon Sep 17 00:00:00 2001 From: ivobenedito Date: Wed, 12 Dec 2012 17:45:31 +0000 Subject: [PATCH] added condition to routes iterator --- lib/api_taster/route.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/api_taster/route.rb b/lib/api_taster/route.rb index b2ed85a..04eb871 100644 --- a/lib/api_taster/route.rb +++ b/lib/api_taster/route.rb @@ -42,7 +42,7 @@ def normalise_routes! if (rack_app = discover_rack_app(route.app)) && rack_app.respond_to?(:routes) rack_app.routes.routes.each do |rack_route| self.routes << normalise_route(rack_route, route.path.spec) - end + end if rack_app.routes.respond_to?(:routes) end next if route.verb.source.empty?