Skip to content

Commit

Permalink
Fix assignment of routes via symbol notation not working.
Browse files Browse the repository at this point in the history
  • Loading branch information
joshaven committed Jun 8, 2010
1 parent cb25dc8 commit 75fa221
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/cilantro/controller.rb
Expand Up @@ -124,7 +124,7 @@ def route(method, in_path, opts, &bk)
rts << rt
end
elsif in_path.is_a?(Symbol)
path = path_with_namespace('')
path = path_with_namespace(in_path)
# warn "Route: #{method} #{path[0]}"
# Save the namespace with this route
application.namespaces["#{method} #{path[0]}"] = [self, namespace]
Expand Down Expand Up @@ -168,7 +168,7 @@ def path_with_namespace(path)
# Path should be sanitized to NOT begin with a slash, and OPTIONALLY end with a slash.
# Scope + Path should be joined with a slash IF the path string does not begin with a '.'
# (namespace + (path =~ /^\./ || path == '' ? '' : '/') + path).gsub(/\/\/+/,'/')
application.send(:compile, ns + path.gsub(/^\//,''))
application.send(:compile, ns + path.to_s.gsub(/^\//,''))
end
end
end
Expand Down

0 comments on commit 75fa221

Please sign in to comment.