Module: EacRedmineUsability::Undeletable::InstanceMethods

Defined in:
lib/eac_redmine_usability/undeletable.rb

Instance Method Summary collapse

Instance Method Details

#block_destroyObject



27
28
29
30
31
32
33
34
# File 'lib/eac_redmine_usability/undeletable.rb', line 27

def block_destroy
  return if ::EacRedmineUsability::Undeletable.allow_destroy

  errors.add :base, 'Este registro não pode ser removido. Em vez disso tente associá-lo a ' \
    'um status como "Rejeitado" ou "Depreciado".'

  throw(:abort)
end