Another tip is to run "rake routes" to see all the available routes.

On Aug 28, 9:26 am, James Englert <englert.ja...@gmail.com> wrote:
> ROR will attempt to find routes from the top of the file first and then move
> on to the rest of the file. It would seem that you have listed projects
> twice:
>
> map.resources :*projects*, :departments, :users, :admins, :imports, :notes
>
> #Below is route in question
> map.resources :*projects*, :collection => { :view_all => :get }
>
> The first one (without the :collection) would be used.
>
> Hope this helps.
>
> On Fri, Aug 28, 2009 at 11:34 AM, John Mcleod <
>
> rails-mailing-l...@andreas-s.net> wrote:
>
> > Hello all,
> > Here's a newbie question (4 weeks and counting).
> > My routes.rb is as below.
>
> > map.resources :projects, :departments, :users, :admins, :imports, :notes
>
> > #Below is route in question
> > map.resources :projects, :collection => { :view_all => :get }
>
> > map.home '', :controller => 'projects', :action => 'index'
> > map.connect ':controller/:action/:id.:format'
> > map.connect ':controller/:action/:id'
>
> > I'm tried to get a url like this:
> >http://localhost:3000/projects/view_all
>
> > I have a view_all in the ProjectsController and I have a view_all
> > template.
>
> > When I type in the desired url, I get this error:
>
> > "ActiveRecord::RecordNotFound in ProjectsController#show
>
> > Couldn't find Project with ID=view_all"
>
> > Thank you for any help.
>
> > JohnM
> > --
> > Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to