[Rails] Re: NoMethodError in User_photos#show

2009-02-17 Thread MaD
well, it seems Paginator is not defined. is pagination working for you in other places? --~--~-~--~~~---~--~~ 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

[Rails] Re: NoMethodError in User_photos#show

2009-02-17 Thread Ken Lim
MaD wrote: well, it seems Paginator is not defined. is pagination working for you in other places? Im not sure whether pagination is working elsewhere. How to check that? and im using rails version 2.02. Is the classic pagination method depreciated? If so, what to change for my controller?

[Rails] Re: NoMethodError in User_photos#show

2009-02-16 Thread MaD
it's always hard to tell what's wrong with other people's code, but let's give it another try: - you said a simple Photo.find(params[:id]) wouldn't work. well, that could mean either params[:id] is not set or set to a value that doesn't exist. did you set a debugger and look at your params? what

[Rails] Re: NoMethodError in User_photos#show

2009-02-16 Thread Ar Chron
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

[Rails] Re: NoMethodError in User_photos#show

2009-02-16 Thread Ken Lim
MaD wrote: it's always hard to tell what's wrong with other people's code, but let's give it another try: - you said a simple Photo.find(params[:id]) wouldn't work. well, that could mean either params[:id] is not set or set to a value that doesn't exist. did you set a debugger and look at

[Rails] Re: NoMethodError in User_photos#show

2009-02-15 Thread Ken Lim
MaD wrote: two suggestions: 1. set a debugger at the beginning of you show-method. that way you will find the reason for @photo being nil. 2. since Photo.id is your primary key (and therefore unique) you could just do your find like this: @photo = Photo.find(params[:id]) instead of the

[Rails] Re: NoMethodError in User_photos#show

2009-02-14 Thread Frederick Cheung
On Feb 14, 3:32 am, Ken Lim rails-mailing-l...@andreas-s.net wrote: MaD wrote: well, the error-message is pretty clear: The error occurred while evaluating nil.user 2: %= link_to #...@photo.user.username}'s Photos, @photo seems to be nil. the reason for it can be found in your

[Rails] Re: NoMethodError in User_photos#show

2009-02-14 Thread MaD
two suggestions: 1. set a debugger at the beginning of you show-method. that way you will find the reason for @photo being nil. 2. since Photo.id is your primary key (and therefore unique) you could just do your find like this: @photo = Photo.find(params[:id]) instead of the much longer:

[Rails] Re: NoMethodError in User_photos#show

2009-02-13 Thread Ken Lim
MaD wrote: well, the error-message is pretty clear: The error occurred while evaluating nil.user 2: � %= link_to #...@photo.user.username}'s Photos, @photo seems to be nil. the reason for it can be found in your controller (where show is defined). I still have no clue at all as I follow

[Rails] Re: NoMethodError in User_photos#show

2009-02-12 Thread MaD
well, the error-message is pretty clear: The error occurred while evaluating nil.user 2:   %= link_to #...@photo.user.username}'s Photos, @photo seems to be nil. the reason for it can be found in your controller (where show is defined). --~--~-~--~~~---~--~~ You