lib/engine2/action/delete.rb in engine2-1.0.6 vs lib/engine2/action/delete.rb in engine2-1.0.7
- old
+ new
@@ -20,10 +20,10 @@
nil
else
unsupported_association assoc[:type]
end
- if assoc[:cascade] || from_assoc == assoc.associated_class.table_name
+ if assoc[:delete] == :cascade || from_assoc == assoc.associated_class.table_name
ds.delete
else
raise Sequel::DestroyFailed.new("#{LOCS[:delete_restricted]}: #{name}") unless ds.empty?
end if ds
end
\ No newline at end of file