# Help with photo album app

**URL:** <https://www.ruby-forum.com/t/help-with-photo-album-app/193990>\
**Category:** Ruby\
**Created:** [August 27, 2010, 4:12pm UTC](https://www.ruby-forum.com/t/help-with-photo-album-app/193990 "2010-08-27T16:12:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaspir](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/3ab097/32.png) [@kaspir](https://www.ruby-forum.com/u/kaspir)\
**Post date:** [August 27, 2010, 4:12pm UTC](https://www.ruby-forum.com/t/help-with-photo-album-app/193990/1 "2010-08-27T16:12:46Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![kaspir](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/3ab097/32.png) [@kaspir](https://www.ruby-forum.com/u/kaspir)\
**Post date:** [August 28, 2010, 8:55am UTC](https://www.ruby-forum.com/t/help-with-photo-album-app/193990/2 "2010-08-28T08:55:34Z")

</div>

On Fri, Aug 27, 2010 at 9:12 AM, Kaspir G.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)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:

> **[Rails Routing from the Outside In — Ruby on Rails Guides](https://guides.rubyonrails.org/routing.html)**
>
> Rails Routing from the Outside InThis guide covers the user-facing features of Rails routing.After reading this guide, you will know: How to interpret the code in config/routes.rb. How to construct your own routes, using either the preferred...
