From bd2f4fc47672fb274bf8c088c94521e229db5726 Mon Sep 17 00:00:00 2001 From: Jose Farias Date: Thu, 17 Oct 2024 23:02:59 -0600 Subject: [PATCH] Fix tag_filters and assignee_filters calls --- app/models/bucket/filterable.rb | 6 +----- app/views/bubbles/_filters.html.erb | 6 +++--- app/views/bubbles/filters/_assignees.html.erb | 2 +- app/views/bubbles/filters/_tags.html.erb | 2 +- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/app/models/bucket/filterable.rb b/app/models/bucket/filterable.rb index e40c2ac9d..744ff99ae 100644 --- a/app/models/bucket/filterable.rb +++ b/app/models/bucket/filterable.rb @@ -1,9 +1,5 @@ module Bucket::Filterable - extend ActiveSupport::Concern - - included do - attr_accessor :tag_filters, :assignee_filters - end + attr_accessor :tag_filters, :assignee_filters def filtered_bubbles(params = {}) result = bubbles diff --git a/app/views/bubbles/_filters.html.erb b/app/views/bubbles/_filters.html.erb index e3112120d..389484c71 100644 --- a/app/views/bubbles/_filters.html.erb +++ b/app/views/bubbles/_filters.html.erb @@ -5,11 +5,11 @@

- <%= tag_filters ? "Tagged" : "with" %> - <%= render "bubbles/filters/tags", bucket: bucket, tag_filters: tag_filters %> + <%= bucket.tag_filters ? "Tagged" : "with" %> + <%= render "bubbles/filters/tags", bucket: bucket %> <% unless unassigned_filter_activated? %> - and <%= render "bubbles/filters/assignees", bucket: bucket, assignee_filters: assignee_filters %> + and <%= render "bubbles/filters/assignees", bucket: bucket %> <% end %>

diff --git a/app/views/bubbles/filters/_assignees.html.erb b/app/views/bubbles/filters/_assignees.html.erb index 301461cee..4b747e0ee 100644 --- a/app/views/bubbles/filters/_assignees.html.erb +++ b/app/views/bubbles/filters/_assignees.html.erb @@ -11,7 +11,7 @@ - <% if assignee_filters %> + <% if bucket.assignee_filters %> <%= link_to bucket_bubbles_path(bucket, view_filter_params.without(:assignee_ids)), class: "btn", style: "font-size: 0.4em;" do %> <%= image_tag "remove.svg", aria: { hidden: true }, size: 24 %> Clear diff --git a/app/views/bubbles/filters/_tags.html.erb b/app/views/bubbles/filters/_tags.html.erb index c33f625f9..23d2c0944 100644 --- a/app/views/bubbles/filters/_tags.html.erb +++ b/app/views/bubbles/filters/_tags.html.erb @@ -11,7 +11,7 @@ - <% if tag_filters %> + <% if bucket.tag_filters %> <%= link_to bucket_bubbles_path(bucket, view_filter_params.without(:tag_ids)), class: "btn", style: "font-size: 0.4em;" do %> <%= image_tag "remove.svg", aria: { hidden: true }, size: 24 %> Clear