- # delete unused relations
- deleted = old.select { |v| not (current_names.include?(v.name)) }
- deleted.each do |pub|
- IssuePublication.delete_all(["issue_publications.issue_id = ? AND issue_publications.publication_id = ?", self.id, pub.id])
- end
+ # delete unused relations
+ deleted = old.select { |v| not (current_names.include?(v.name)) }
+ deleted.each do |pub|
+ IssuePublication.delete_all(["issue_publications.issue_id = ? AND issue_publications.publication_id = ?", self.id, pub.id])
+ end