My classes are as follows, with Customer inheriting from User using the single-table inheritance approach. User has attributes name and email while Order has destination.
<
Try updating you Customer class association with
has_many :orders, :dependent => :destroy
or
has_many :orders, :dependent => :delete_all
Depending on what you want to achieve.
:destroy causes all the associated objects to also be destroyed.
:delete_all causes all the associated objects to be deleted directly from the database without executing callbacks.