Created
September 25, 2010 17:11
-
-
Save dpickett/597060 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
def following_by_type(followable_type, options={}) | |
#might have to const_get here | |
followable_type.joins("INNER JOIN follows ON follower_type = #{followable_type.name}").where("follows.follower_id = ?", self.id) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment