class FooBar < ApplicationRecord
has_and_belongs_to_many :baz_qux
end
class BazQux < ApplicationRecord
has_and_belongs_to_many :foo_bar
end
class CreateJoinTableBazQuxFooBar < ActiveRecord::Migration[5.1]
def up
create_table :baz_qux_foo_bar, id: false do |t|
t.references :baz_qux
t.references :foo_bar
end
end
end
FooBar model has deleted_at column
Let's we have a
f_b = FooBar.create
When we try to destroy it we got a error
undefined method 'foobar_baz_qux'
FooBar model has deleted_at column
Let's we have a f_b = FooBar.create
When we try to destroy it we got a error undefined method 'foobar_baz_qux'