From 67d1cec4c8a65846cc3b2779bc5eca7b8b73e6fc Mon Sep 17 00:00:00 2001 From: Andrew White Date: Mon, 22 Feb 2010 10:46:45 +0000 Subject: Add the ability to specify table_name_prefix on individual modules Signed-off-by: wycats --- activerecord/test/models/company_in_module.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'activerecord/test/models') diff --git a/activerecord/test/models/company_in_module.rb b/activerecord/test/models/company_in_module.rb index cdda7a44d4..83d71b6909 100644 --- a/activerecord/test/models/company_in_module.rb +++ b/activerecord/test/models/company_in_module.rb @@ -32,6 +32,23 @@ module MyApplication has_and_belongs_to_many :developers end + module Prefixed + def self.table_name_prefix + 'prefixed_' + end + + class Company < ActiveRecord::Base + end + + class Firm < Company + self.table_name = 'companies' + end + + module Nested + class Company < ActiveRecord::Base + end + end + end end module Billing -- cgit v1.2.3