mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-26 20:56:48 +00:00
11 lines
317 B
Ruby
11 lines
317 B
Ruby
# frozen_string_literal: false
|
|
|
|
class EnterpriseEditReflex < ApplicationReflex
|
|
def remove_terms_and_conditions
|
|
@enterprise = Enterprise.find(element.dataset['enterprise-id'])
|
|
throw :forbidden unless can?(:remove_terms_and_conditions, @enterprise)
|
|
|
|
@enterprise.terms_and_conditions.purge_later
|
|
end
|
|
end
|