I can do this. Is there a more idiomatic way or something directly supported by the API?
transaction do
Organization.find_roles(:any, organization).where(resource_id: organization.id).pluck(:name).each |role_name|
remove_role(role_name, organization)
end
add_role('new_role', organization)
end