Use inverse_of

ActiveRecord will try hard to infer the inverse relation for your associations, but you may benefit from setting the inverse_of option wherever possible

Page 2 of 2 · Previous