Created
September 19, 2016 19:18
-
-
Save thescubageek/965206b8fb3c92f7fc38f42e7b0165cd to your computer and use it in GitHub Desktop.
finds locations with multiple websites - CMS
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 find_multi_website_locations | |
Location.all.select { |l| Website.where(owner_id: l.id).count > 1 } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment