Reuse concern
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user