Don't do a heavy count() query when paginating the ~user newsfeed, instead cheat.
authorJohan Sørensen <johan@johansorensen.com>
Tue, 8 Dec 2009 13:44:08 +0000 (14:44 +0100)
committerJohan Sørensen <johan@johansorensen.com>
Tue, 8 Dec 2009 13:45:22 +0000 (14:45 +0100)
commit2059345dcd550ed0270df4ccc16e484b0e3076c3
tree8b22261cb498af49599deda9b3ccb6ba57c2d9ad
parent12dfaa13714b8767ab7fd95310847934221efdd4
Don't do a heavy count() query when paginating the ~user newsfeed, instead cheat.

.. by always assuming there's one more record than what's displayed on the page
app/controllers/users_controller.rb
app/models/user.rb
app/views/events/_events.html.erb
app/views/users/show.html.erb
test/unit/favorite_test.rb
test/unit/user_test.rb