Skip to content

Commit

Permalink
Remove unused private methods from controller
Browse files Browse the repository at this point in the history
  • Loading branch information
mtaylorgds committed Nov 1, 2023
1 parent a292fdb commit 01214e3
Showing 1 changed file with 0 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,33 +58,6 @@ def order

private

def moving?
params[:commit] == "Move"
end

def delete_from_old_group(membership_ids)
ids = @group.membership_ids - membership_ids
@group.set_membership_ids_in_order!(ids)
end

def move_to_new_group(membership_ids)
ids = new_group.membership_ids + membership_ids
new_group.set_membership_ids_in_order!(ids)
end

def success_message(membership_ids)
count = "#{membership_ids.size} #{'document'.pluralize(membership_ids.size)}"
if moving?
"#{count} moved to '#{new_group.heading}'"
else
"#{count} removed from '#{@group.heading}'"
end
end

def new_group
@collection.groups.find(params[:new_group_id])
end

def load_document_collection
@collection = DocumentCollection.includes(document: :latest_edition).find(params[:document_collection_id])
end
Expand Down

0 comments on commit 01214e3

Please sign in to comment.