lib/padrino-routing.rb in padrino-routing-0.1.5 vs lib/padrino-routing.rb in padrino-routing-0.2.0

- old
+ new

@@ -16,11 +16,11 @@ # map constructs a mapping between a named route and a specified alias # the mapping url can contain url query parameters # map(:accounts).to('/accounts/url') # map(:admin, :show).to('/admin/show/:id') # map(:admin) { |namespace| namespace.map(:show).to('/admin/show/:id') } - def map(*args, &block) - named_router = Padrino::Routing::NamedRoute.new(self, *args) + def map(*names, &block) + named_router = Padrino::Routing::NamedRoute.new(self, *names) block_given? ? block.call(named_router) : named_router end # Used to define namespaced route configurations in order to group similar routes # Class evals the routes but with the namespace assigned which will append to each route