Created
May 14, 2014 23:59
-
-
Save haosu/bd561629369ca5d13f5b 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
scope :untaken, lambda do |profile| | |
joins(<<-SQL).where('action_credits.id is null') | |
LEFT OUTER JOIN action_credits ON | |
actions.id = action_credits.action_id | |
AND action_credits.profile_id = | |
#{profile.id} | |
SQL | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment