6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'app/controllers/hyrax/admin/permission_template_accesses_controller.rb', line 6
def destroy
ActiveRecord::Base.transaction do
@permission_template_access.destroy
remove_access!
end
if @permission_template_access.destroyed?
redirect_to hyrax.edit_admin_admin_set_path(admin_set_id,
anchor: 'participants'),
notice: translate('participants', scope: 'hyrax.admin.admin_sets.form.permission_update_notices')
else
redirect_to hyrax.edit_admin_admin_set_path(admin_set_id,
anchor: 'participants'),
alert: @permission_template_access.errors.full_messages.to_sentence
end
end
|