app/models/stop_area_provider.rb
# This before_validation callback needs to be declared before the one in ObjectidSupport, to prevent a crash if referential_identifier doesn't find the related stop area referential
# I removed the on_create argument, since that callback needs to be fired even on initialize in workbench#create_dependencies
This before_validation callback needs to be declared before the one in ObjectidSupport, to prevent a crash if referential_identifier doesn't find the related stop area referential
I removed the on_create argument, since that callback needs to be fired even on initialize in workbench#create_dependencies
This before_validation callback needs to be declared before the one in ObjectidSupport to prevent a crash if referential_identifier doesn ' t find the related stop area referential I removed the on_create argument since that callback needs to be fired even on initialize in workbench#create_dependencies
def can_destroy?
    if used?
      self.errors.add(:base, "Can't be destroy because it has at least one stop area")
      throw :abort
    end
  end
def can_destroy? if used? self . errors . add ( :base , "Can't be destroy because it has at least one stop area" ) throw :abort end end
This before_validation callback needs to be declared before the one in ObjectidSupport, to prevent a crash if referential_identifier doesn't find the related stop area referential
I removed the on_create argument, since that callback needs to be fired even on initialize in workbench#create_dependencies
This before_validation callback needs to be declared before the one in ObjectidSupport to prevent a crash if referential_identifier doesn ' t find the related stop area referential I removed the on_create argument since that callback needs to be fired even on initialize in workbench#create_dependencies