Created
January 1, 2012 20:00
-
-
Save getnashty/1548189 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 self.fetch_cache(user) | |
#Make sure the user has companies to cache (based on companies they're a team member of) | |
if user.profile.team.companies.count > 0 | |
return Rails.cache.fetch(user.profile.team.companies) { | |
user.profile.team.companies | |
} | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment