aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2010-04-14 18:15:27 +0100
committerJosé Valim <jose.valim@gmail.com>2010-04-25 16:04:38 +0200
commit8ec085bf1804770a547894967fcdee24087fda87 (patch)
tree41cb3f488ec760649ad4b3be694652aa5a26641f /activerecord/test/models
parent77c099c231f2efb36a2a77a32138ed5c6761ec19 (diff)
downloadrails-8ec085bf1804770a547894967fcdee24087fda87.tar.gz
rails-8ec085bf1804770a547894967fcdee24087fda87.tar.bz2
rails-8ec085bf1804770a547894967fcdee24087fda87.zip
Support fixtures for namespaced models [#2965 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activerecord/test/models')
-rw-r--r--activerecord/test/models/admin.rb5
-rw-r--r--activerecord/test/models/admin/account.rb3
-rw-r--r--activerecord/test/models/admin/user.rb3
3 files changed, 11 insertions, 0 deletions
diff --git a/activerecord/test/models/admin.rb b/activerecord/test/models/admin.rb
new file mode 100644
index 0000000000..00e69fbed8
--- /dev/null
+++ b/activerecord/test/models/admin.rb
@@ -0,0 +1,5 @@
+module Admin
+ def self.table_name_prefix
+ 'admin_'
+ end
+end \ No newline at end of file
diff --git a/activerecord/test/models/admin/account.rb b/activerecord/test/models/admin/account.rb
new file mode 100644
index 0000000000..46de28aae1
--- /dev/null
+++ b/activerecord/test/models/admin/account.rb
@@ -0,0 +1,3 @@
+class Admin::Account < ActiveRecord::Base
+ has_many :users
+end \ No newline at end of file
diff --git a/activerecord/test/models/admin/user.rb b/activerecord/test/models/admin/user.rb
new file mode 100644
index 0000000000..74bb21551e
--- /dev/null
+++ b/activerecord/test/models/admin/user.rb
@@ -0,0 +1,3 @@
+class Admin::User < ActiveRecord::Base
+ belongs_to :account
+end \ No newline at end of file