Pass the new param this partial requires

This commit is contained in:
Jorge Manrubia
2025-09-09 12:12:39 +02:00
parent c36420800e
commit 07bdcb7a9c
2 changed files with 9 additions and 5 deletions
+8 -4
View File
@@ -25,16 +25,20 @@ class Cards::DropsController < ApplicationController
def perform_drop_action
case @drop_target
when :considering
@card.reconsider
@card.reconsider
when :on_deck
@card.move_to_on_deck
@card.move_to_on_deck
when :doing
@card.engage
@card.engage
end
end
def render_column_replacement
page_and_filter = page_and_filter_for @filter.with(engagement_status: @drop_target.to_s), per_page: CardsController::PAGE_SIZE
render turbo_stream: turbo_stream.replace("#{@drop_target.to_s.gsub('_', '-')}-cards", method: :morph, partial: "cards/index/engagement/#{@drop_target}", locals: page_and_filter.to_h)
render \
turbo_stream: turbo_stream.replace("#{@drop_target.to_s.gsub('_', '-')}-cards",
method: :morph,
partial: "cards/index/engagement/#{@drop_target}",
locals: { user_filtering: @user_filtering, **page_and_filter.to_h })
end
end
+1 -1
View File
@@ -95,7 +95,7 @@ class FilterTest < ActiveSupport::TestCase
assert_changes "filter.reload.updated_at" do
tags(:mobile).destroy!
end
assert_nil filter.reload.as_params[:tag_ids]
assert_nil Filter.find(filter.id).as_params[:tag_ids]
Current.set session: sessions(:david) do
assert_changes "Filter.exists?(filter.id)" do