Setting join_table on AR tests

This commit is contained in:
Arthur Neves 2013-10-17 13:35:00 -04:00 committed by Santiago Pastorino
parent 4ab16381bd
commit cf8b55ea01

View File

@ -38,13 +38,13 @@ end
class ARPost < ActiveRecord::Base
has_many :ar_comments, class_name: 'ARComment'
has_and_belongs_to_many :ar_tags, class_name: 'ARTag'
has_and_belongs_to_many :ar_tags, class_name: 'ARTag', join_table: :ar_posts_tags
belongs_to :ar_section, class_name: 'ARSection'
end
class ARComment < ActiveRecord::Base
belongs_to :ar_post, class_name: 'ARPost'
has_and_belongs_to_many :ar_tags, class_name: 'ARTag'
has_and_belongs_to_many :ar_tags, class_name: 'ARTag', join_table: :ar_comments_tags
end
class ARTag < ActiveRecord::Base