This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
empty = ActiveFedora::SimpleDatastream.xml_template.to_xml | |
mf = MasterFile.find(pid) # Load the MasterFile. | |
if mf.workflow_id.present? | |
begin | |
Rubyhorn.client.stop(mf.workflow_id) # Stop the existing workflow. | |
rescue # Keep going even if stopping the workflow fails. | |
end # This means there might be more cleanup later. | |
end | |
mf.mhMetadata.content = empty # Remove all Matterhorn-related fields. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RolesController < ApplicationController | |
include Hydra::RoleManagement::RolesBehavior | |
prepend_before_filter :accept_batches, only: [:destroy] | |
def destroy | |
@roles.each {|role| role.destroy} | |
redirect_to roles_path, notice: "Successfully deleted groups: #{params[:ids].join(", ")}" | |
end |