For rs.recognize_path "/projects/", it''d be helpful to
include the HTTP
method. So...something like
rs.recognize_path "/projects/", :method => :get
should work.
-Tiffani A.B.
On 5/14/07, Jonathan Linowes
<linojon-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
>
> hi,
>
> in script/console, when i do
> >> rs = ActionController::Routing::Routes
> >> puts rs.routes
>
> the list includes
> GET /projects/
> {:controller=>"projects", :action=>"index"}
>
> but
>
> >> rs.recognize_path "/projects/"
> ActionController::RoutingError: no route found to match
"/projects/"
> with {}
> from /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/
> action_controller/routing.rb:1292:in `recognize_path''
> from (irb):27
> from :0
>
> and
>
> >> rs.generate :controller => "project"
> ActionController::RoutingError: No route matches
> {:controller=>"project", :action=>"index"}
> from /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/
> action_controller/routing.rb:1266:in `generate''
> from (irb):26
> from :0
>
> same with my other controllers
> but it works for named routes defined with map.connect and with map.*
>
> what am i missing?
>
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---