Skip to content

Instantly share code, notes, and snippets.

@cowboycoded
Created April 12, 2011 02:32
Show Gist options
  • Save cowboycoded/914811 to your computer and use it in GitHub Desktop.
Save cowboycoded/914811 to your computer and use it in GitHub Desktop.
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