Created
April 12, 2011 02:32
-
-
Save cowboycoded/914811 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
module ApplicationHelper | |
def private_cache (name = {}, &block) | |
if @user.blank? | |
yield and return #note.. I had to add this return..otherwise it rendered twice | |
else | |
cache(name, &block) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment