On Rails 4.
I have a Rental
model which belongs_to :house
and belongs_to :user
When a user destroys his/her account, the rentals associated with the user are being destroyed, although they are also still associated with a house.
What is the best way to go about keeping the rentals regardless of the user associated with the rental being destroyed? That way @house.rentals
can still be viewed, but simply won't have a user object anymore.
I am not declaring dependent: :destroy
, so I thought this would be default behavior, but it is not.
thx!