Reuse concern

This commit is contained in:
Jorge Manrubia
2025-10-30 09:24:37 +01:00
parent e8630159ab
commit c1936abed9
@@ -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