Created
December 8, 2017 19:37
-
-
Save marisastrong/31166ed346ce09cadea50533dcb79c0a to your computer and use it in GitHub Desktop.
This is where we put some information on the code snippet what it does and why it is useful to use
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
/* this is my gist. can be code if i want. */ | |
ids = [] | |
Template.find_by_sql(id_query).each do |templ| | |
ids << templ.id | |
end | |
Template.includes(:org).where(id: ids).order('orgs.name, templates.title') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment