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
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?
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
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
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
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
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
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:
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
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
10 matches
Mail list logo