Created
July 13, 2018 01:01
-
-
Save jdaviderb/2f29178e77e905b760f81584a96085eb 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
def filter | |
Budget::Investment | |
.where(mariquito, "valor del status") | |
end | |
def mariquito | |
<<-SQL | |
(SELECT status_id FROM budget_investment_milestones | |
WHERE investment_id = budget_investments.id ORDER BY created_at ASC LIMIT !) = ? | |
SQL | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment