From 2e42e92895f9c9dd1c3c416bc6bcf12f8eeaf569 Mon Sep 17 00:00:00 2001 From: Nicolas Brousse Date: Wed, 9 Oct 2024 17:03:02 +0200 Subject: [PATCH] fix: update forgotten server filters links (#228) --- app/models/filter.rb | 2 +- app/views/frames/show.html.erb | 2 +- .../previews/has_many_turbo_frame_component_preview.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/filter.rb b/app/models/filter.rb index 73dfd5cc4..058f22583 100644 --- a/app/models/filter.rb +++ b/app/models/filter.rb @@ -77,7 +77,7 @@ def respond_to_missing?(symbol, include_all) def _permitted_attributes_names attribute_names.map do |attribute_name| if attribute_name.end_with?("_ids") - { attribute_name => [] } + [attribute_name, { attribute_name => [] }] else attribute_name end diff --git a/app/views/frames/show.html.erb b/app/views/frames/show.html.erb index df14dd867..fa0330547 100644 --- a/app/views/frames/show.html.erb +++ b/app/views/frames/show.html.erb @@ -37,6 +37,6 @@ -<%= render HasManyTurboFrameComponent.new(Server.model_name.human.pluralize, url: servers_path(frame_id: @frame.id), frame_id: dom_id(Server, :table)) %> +<%= render HasManyTurboFrameComponent.new(Server.model_name.human.pluralize, url: servers_path(frame_ids: @frame.id), frame_id: dom_id(Server, :table)) %> <%= render ChangelogEntries::ObjectListComponent.new(@frame) %> diff --git a/spec/components/previews/has_many_turbo_frame_component_preview.rb b/spec/components/previews/has_many_turbo_frame_component_preview.rb index 6271dfc18..d53dc888a 100644 --- a/spec/components/previews/has_many_turbo_frame_component_preview.rb +++ b/spec/components/previews/has_many_turbo_frame_component_preview.rb @@ -2,6 +2,6 @@ class HasManyTurboFrameComponentPreview < ViewComponent::Preview def default - render(HasManyTurboFrameComponent.new(Server.model_name.human.pluralize, url: servers_path(frame_id: Frame.first.id), frame_id: "table_server")) + render(HasManyTurboFrameComponent.new(Server.model_name.human.pluralize, url: servers_path(frame_ids: Frame.first.id), frame_id: "table_server")) end end