class ActiveRecord::DeleteRestrictionError

:nodoc:
ex: if @project.tasks.size > 0, DeleteRestrictionError will be raised when trying to destroy @project
(has_many, has_one) when there is at least 1 child associated instance.
This error is raised when trying to destroy a parent instance in N:1 or 1:1 associations

def initialize(name)

:nodoc:
ex: if @project.tasks.size > 0, DeleteRestrictionError will be raised when trying to destroy @project
(has_many, has_one) when there is at least 1 child associated instance.
This error is raised when trying to destroy a parent instance in N:1 or 1:1 associations
def initialize(name)
  super("Cannot delete record because of dependent #{name}")
end