lib/roda/plugins/multi_route.rb in roda-2.0.0 vs lib/roda/plugins/multi_route.rb in roda-2.1.0

- old
+ new

@@ -145,10 +145,11 @@ subclass::RodaRequest.instance_variable_set(:@namespaced_route_regexps, {}) end # The names for the currently stored named routes def named_routes(namespace=nil) - opts[:namespaced_routes][namespace].keys + routes = opts[:namespaced_routes][namespace] + routes ? routes.keys : [] end # Return the named route with the given name. def named_route(name, namespace=nil) opts[:namespaced_routes][namespace][name]