Skip to content

Instantly share code, notes, and snippets.

@lcowell
Created October 3, 2013 16:13
Show Gist options
  • Save lcowell/6812477 to your computer and use it in GitHub Desktop.
Save lcowell/6812477 to your computer and use it in GitHub Desktop.
class ActiveRecord::Base
# check that cache_key is already defined here
include Jane::MultiTenantedCacheKeys
end
module MultiTenantedCacheKeys
def cache_key
database_name + super
end
def database_name
# do it!
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment