app/controllers/hyrax/admin/permission_template_accesses_controller.rb
# This is a controller validation rather than a model validation
# because we don't want to prevent the ability to remove the whole
# PermissionTemplate and all of its associated PermissionTemplateAccesses
# @return [Boolean] true if it's valid
This is a controller validation rather than a model validation
because we don't want to prevent the ability to remove the whole
PermissionTemplate and all of its associated PermissionTemplateAccesses
This is a controller validation rather than a model validation because we don ' t want to prevent the ability to remove the whole PermissionTemplate and all of its associated PermissionTemplateAccesses
def valid_delete?
        return true unless @permission_template_access.admin_group?
        @permission_template_access.errors[:base] <<
            t('hyrax.admin.admin_sets.form.permission_destroy_errors.admin_group')
        false
      end
def valid_delete? return true unless @permission_template_access . admin_group? @permission_template_access . errors [ :base ] << t ( 'hyrax.admin.admin_sets.form.permission_destroy_errors.admin_group' ) false end
This is a controller validation rather than a model validation
because we don't want to prevent the ability to remove the whole
PermissionTemplate and all of its associated PermissionTemplateAccesses
This is a controller validation rather than a model validation because we don ' t want to prevent the ability to remove the whole PermissionTemplate and all of its associated PermissionTemplateAccesses
true if it's valid
true if it ' s valid
Boolean