aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2010-02-22 10:46:45 +0000
committerwycats <wycats@gmail.com>2010-03-28 23:43:28 -0700
commit67d1cec4c8a65846cc3b2779bc5eca7b8b73e6fc (patch)
tree861e8f3b51c78e2b0aee197cbaf5f189e77666ff /activerecord/test/models
parent48c1d8c341e1fe09111424131f7d223ad032b7e1 (diff)
downloadrails-67d1cec4c8a65846cc3b2779bc5eca7b8b73e6fc.tar.gz
rails-67d1cec4c8a65846cc3b2779bc5eca7b8b73e6fc.tar.bz2
rails-67d1cec4c8a65846cc3b2779bc5eca7b8b73e6fc.zip
Add the ability to specify table_name_prefix on individual modules
Signed-off-by: wycats <wycats@gmail.com>
Diffstat (limited to 'activerecord/test/models')
-rw-r--r--activerecord/test/models/company_in_module.rb17
1 files changed, 17 insertions, 0 deletions
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