Sounds like a routing problem. Take a look in your config/routes.rb
file and see what it says about ''photos'' in there. You might
need a
line like
map.resource :photos
or something like that.
What''s happening is probably that Rails is trying to interpret /photos/
index as a :controller/:id type of URL. Understood in this framework,
the controller would be ''photos'' and the id would be
''index''.
-Mike
On Jul 30, 3:01 pm, "mostafa badawi"
<badaw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hi all,
>
> I need help in this problem.
> - i have a model class named Photo, a controller Photos.
> - when typing the URLhttp://localhost:3000/photosRails calls the default
> index method.
> - but when typinghttp://localhost:3000/photos/indexerror saying
"Couldn''t
> find Photo with ID=index" pops up, i cant even imagine why.
> - my Rails version is 2.1.0
>
> thanks in advance
> yours,
> Mostafa Badawi
--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---