Rails 4 Migration: has_and_belongs_to_many table name

前端 未结 1 1652
小蘑菇
小蘑菇 2021-02-02 11:08

I currently try to switch a rails 3.2 app to rails 4.0. But I have one problem with a has_and_belongs_many model.

I have created a test app and I have the s

1条回答
  •  失恋的感觉
    2021-02-02 11:44

    I fixed the problem by adding the join_table name to every model like:

    has_and_belongs_to_many :foo_urls,  :join_table => :foo_clips_foo_urls
    

    0 讨论(0)
提交回复
热议问题