Created
September 9, 2009 13:20
-
-
Save nahi/183701 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/models/feed.rb b/app/models/feed.rb | |
index bbc2719..4a4423a 100644 | |
--- a/app/models/feed.rb | |
+++ b/app/models/feed.rb | |
@@ -308,8 +308,8 @@ class Feed | |
num = opt[:num] | |
pinned = Pin.find( | |
:all, | |
- :conditions => [ 'user_id = ?', auth.id ], | |
- :joins => 'LEFT OUTER JOIN last_modifieds ON pins.eid = last_modifieds. | |
eid', | |
+ :conditions => [ 'pins.eid = last_modifieds.eid AND user_id = ?', auth. | |
id ], | |
+ :joins => 'LEFT OUTER JOIN last_modifieds', | |
:order => 'last_modifieds.date desc', | |
:offset => start, | |
:limit => num |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment