Is your entries association funny in any way ?
Fred
Hi Fred,
thanks. I have users and entries controller. In my show controller
(mydomain.com/profile/:username), I am using <% for entry in
@user.entries %> to show user posts. I dont know, if it is funny in any
way or not. :).
Frederick Cheung wrote:
> Is your entries association funny in any way ?
> Fred
Hi Fred,
thanks. I have users and entries controller. In my show controller
(mydomain.com/profile/:username), I am using <% for entry in
@user.entries %> to show user posts. I dont know, if it is funny in any
way or not. :).
That's not what I meant. What I meant was does it have any interesting
options on it that might confuse will paginate ?
That's not what I meant. What I meant was does it have any interesting
options on it that might confuse will paginate ?
Fred
No, its just a plain text and thats it. It is a simple sideblog
(user_id,body,created_at).Could it be problem, that I am using data from
entries controller in User controller? Cheers, Pete
> That's not what I meant. What I meant was does it have any interesting
> options on it that might confuse will paginate ?
> Fred
No, its just a plain text and thats it. It is a simple sideblog
(user_id,body,created_at).
That's not what I meant. I was thinking of things like
custom :finder_sql and so on
Could it be problem, that I am using data from
entries controller in User controller?
No.
You mentionned
I am using <% for entry in
@user.entries %> to show user posts. I dont know, if it is funny in any
way or not. :).
If you actually have that line in your view you'll be ignoring the
pagination stuff completely, since @entries is the thing with the
limited collection
If you actually have that line in your view you'll be ignoring the
pagination stuff completely, since @entries is the thing with the
limited collection
Fred
Hi Fred,
all right, thanks. I've just tried to render the posts as collections of
partials. <%= render :partial => 'user_posts', :collection =>
@user.entries %>
But it is still the same. Is there another way to show only the users
posts and then be able to paginate them? THX
> If you actually have that line in your view you'll be ignoring the
> pagination stuff completely, since @entries is the thing with the
> limited collection
> Fred
Hi Fred,
all right, thanks. I've just tried to render the posts as collections of
partials. <%= render :partial => 'user_posts', :collection =>
@user.entries %>
no. you need :collection => @entries (assuming that in your controller
you've done @entries = @user.entries.paginate ...