diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-06-19 14:57:51 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-06-19 14:59:48 -0300 |
commit | 76d6ec2a9a18ed92e1e8fdf445401a1e22f36713 (patch) | |
tree | a8b4e1cf2e29c2a1093a62c4a525d27b935e36e2 /activerecord/test/schema | |
parent | 498373468144b434322e8c3b2611ac5fc54e72ad (diff) | |
download | rails-76d6ec2a9a18ed92e1e8fdf445401a1e22f36713.tar.gz rails-76d6ec2a9a18ed92e1e8fdf445401a1e22f36713.tar.bz2 rails-76d6ec2a9a18ed92e1e8fdf445401a1e22f36713.zip |
Fix has_and_belongs_to_many in a namespaced model pointing to a non namespaced model
Now the following case will work fine
class Tag < ActiveRecord::Base
end
class Publisher::Article < ActiveRecord::Base
has_and_belongs_to_many :tags
end
Fixes #15761
Diffstat (limited to 'activerecord/test/schema')
-rw-r--r-- | activerecord/test/schema/schema.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb index a7c7fc70bc..fd85050dd4 100644 --- a/activerecord/test/schema/schema.rb +++ b/activerecord/test/schema/schema.rb @@ -62,6 +62,11 @@ ActiveRecord::Schema.define do t.references :magazine end + create_table :articles_tags, force: true do |t| + t.references :article + t.references :tag + end + create_table :audit_logs, force: true do |t| t.column :message, :string, null: false t.column :developer_id, :integer, null: false |