Created
April 14, 2013 16:26
Revisions
-
bradrobertson created this gist
Apr 14, 2013 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ # Broken Example class Company < ActiveRecord::Base include IdentityCache cache_index :subdomain end Company.table_name = 'public.companies' Company.fetch_by_subdomain('app') # => SELECT id FROM companies WHERE subdomain = 'app' LIMIT 1 # Fix for Broken Example class Company < ActiveRecord::Base self.table_name = 'public.companies' include IdentityCache cache_index :subdomain end Company.fetch_by_subdomain('app') # => SELECT id FROM public.companies WHERE subdomain = 'app' LIMIT 1