Help with photo album app

I’m developing a photo album app that has albums, with pictures
displayed inside of the albums. When you click on the photo, it goes to
the photo’s url. What I would like it to do, is go to “picture.html.erb”
in “views/albums” so I can style it, and add “Next” and “Previous”
links.

This is the last thing I have to do to the album then I’m done, so it
figures I would run into a problem with this. I tried linking straight
to “picture.html.erb” and it brings error:

No route matches “/albums/picture.html.erb” with {:method=>:get}

I’m not sure what to do about this. Also, I’ve no idea in what direction
to go when creating the preivous and next links for the pictures. Could
somebody please give me a push in the right direction or a link to a
tutorial?

Many thanks in advance!

On Fri, Aug 27, 2010 at 9:12 AM, Kaspir G.
[email protected]wrote:

No route matches “/albums/picture.html.erb” with {:method=>:get}

I assume you are using Rails (this is a Ruby mailing list, not a Ruby on
Rails mailing list).

You will get more pertinent responses on a Rails mailing list. In the
meantime, what you need to realize is that routes determine what
controller
to invoke, not what view to render. Presumably you want the controller
that
is associated with the picture show. It will probably look about like
this:

$ rake routes | grep picture | grep show
picture GET /pictures/:id(.:format)
{:controller=>“pictures”, :action=>“show”}

For more information, try the guide on routing: