Ken Lim wrote:
> The above method doesnt work. Any other solutions? Does it got to do 
> with my photo controller?

Maybe yes, maybe no.

1. Does the index view work correctly (do you get the index page with 9 
photos)?

2. When you view the source for your index page, what does the link_to 
url look like for a given photo?

3. When selecting that link hits your show method, what is params[:id]?

4. Given you have a valid params[:id] in the show method, why not just a 
simple
  @photo = Photo.find(:first, blah blah conditions blah blah)

5. You can also put error trapping code in your controller to catch your 
possible ActiveRecord error

Step by step triage is a very general, very valuable, very necessary 
skill...
-- 
Posted via http://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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to