lib/usher/interface/rails22.rb in usher-0.6.3 vs lib/usher/interface/rails22.rb in usher-0.6.4

- old
+ new

@@ -44,10 +44,10 @@ route end def recognize(request) node = @usher.recognize(request) - params = node.params.inject({}){|h,(k,v)| h[k]=v; h } + params = node.params_as_hash request.path_parameters = (node.params.empty? ? node.path.route.destination : node.path.route.destination.merge(params)).with_indifferent_access "#{request.path_parameters[:controller].camelize}Controller".constantize rescue raise ActionController::RoutingError, "No route matches #{request.path.inspect} with #{request.inspect}" end