added dependent: :destroy for has_many relations