lib/nephos-server/router/helpers.rb in nephos-server-0.6.9 vs lib/nephos-server/router/helpers.rb in nephos-server-0.7.0
- old
+ new
@@ -15,12 +15,12 @@
# The method create a valid route, set in Nephos::Router::ROUTES
# it will call the method from the controller, based on the parameters
# if the client request match with the verb and the url provided.
#
# Checkout the documentation about the parameters and API for more informations
-def add_route(verb, url=nil, what)
+def add_route(verb, option_url=nil, what)
raise InvalidRoute, "what must be a hash" unless what.is_a? Hash
- what[:url] ||= url
+ what[:url] ||= option_url
Array(what[:url]).each do |url|
route = what.dup
route[:url] = url
route[:url] = File.expand_path File.join(route_prefix, route[:url])
Nephos::Router.check!(route)