2013-02-20 44 views
0

下面黑子Rails的情景has_and_belongs_to_many协会中没有加载include指令,尽管:太阳黑子搜索包括未装载has_and_belongs_to_many协会

has_and_belongs_to_many :predecessors, :join_table => 'next_phrases', :class_name => "Phrase", :foreign_key => 'next_id', :association_foreign_key => 'previous_id' 


searchable :include =>[:predecessors] do 
    integer :predecessor_ids, :multiple => true,:references => Phrase 
end 

是我们做错了什么或者是一个错误?

如果我们调用self.association它的工作(:前身)用手

回答

0

.reload它可能有一些做的事实,predecessor_ids是类型数组的内场。它的作品如果名称更改为整数:前辈。