destroying.rb revision 214b17ce5309c42f31fa6df96778cc9c85ae927d
214b17ce5309c42f31fa6df96778cc9c85ae927dEugen Kuksa before_destroy :mark_as_destroying, prepend: true
214b17ce5309c42f31fa6df96778cc9c85ae927dEugen Kuksa self.class.instance_variable_get(:@destroying).include?(self.id)
214b17ce5309c42f31fa6df96778cc9c85ae927dEugen Kuksa raise e.class, "Can't delete repository: It contains an ontology that is imported by another repository."
214b17ce5309c42f31fa6df96778cc9c85ae927dEugen Kuksa self.class.instance_variable_get(:@destroying) << self.id if self.id
214b17ce5309c42f31fa6df96778cc9c85ae927dEugen Kuksa def unmark_as_destroying
214b17ce5309c42f31fa6df96778cc9c85ae927dEugen Kuksa self.class.instance_variable_get(:@destroying).delete(self.id) if self.id