diff --git a/app/controllers/cards/collections_controller.rb b/app/controllers/cards/collections_controller.rb index 7a9f0b097..7d3ff8b9b 100644 --- a/app/controllers/cards/collections_controller.rb +++ b/app/controllers/cards/collections_controller.rb @@ -1,5 +1,7 @@ class Cards::CollectionsController < ApplicationController - before_action :set_collection, only: %i[ update ] + include CollectionScoped + + skip_before_action :set_collection, only: %i[ edit ] def edit @card = Current.user.accessible_cards.find(params[:card_id]) @@ -11,9 +13,4 @@ class Cards::CollectionsController < ApplicationController @card.move_to(@collection) redirect_to @card end - - private - def set_collection - @collection = Current.user.collections.find(params[:collection_id]) - end end