diff --git a/app/controllers/bubbles_controller.rb b/app/controllers/bubbles_controller.rb
index d4a475cb0..711b52a51 100644
--- a/app/controllers/bubbles_controller.rb
+++ b/app/controllers/bubbles_controller.rb
@@ -14,6 +14,11 @@ class BubblesController < ApplicationController
@tag = Current.account.tags.find(params[:tag_id])
@bubbles = @bubbles.tagged_with(@tag)
end
+
+ if params[:assignee_id]
+ @assignee = @bucket.users.find(params[:assignee_id])
+ @bubbles = @bubbles.assigned_to(@assignee)
+ end
end
def new
diff --git a/app/views/bubbles/_filters.html.erb b/app/views/bubbles/_filters.html.erb
new file mode 100644
index 000000000..29fa9a5fa
--- /dev/null
+++ b/app/views/bubbles/_filters.html.erb
@@ -0,0 +1,82 @@
+
+
+
+ in
+
+
+
+
+
+
+
+
+
+ <%= tag ? "Tagged" : "with" %>
+
+
+
+
+
+
+ <% if tag %>
+ <%= link_to params.permit(:filter, :assignee_id), class: "btn", style: "font-size: 0.4em;" do %>
+ <%= image_tag "remove.svg", aria: { hidden: true }, size: 24 %>
+ Clear
+ <% end %>
+ <% end %>
+
+
+ and
+
+
+
+
+
+
+ <% if assignee %>
+ <%= link_to params.permit(:filter, :tag_id), class: "btn", style: "font-size: 0.4em;" do %>
+ <%= image_tag "remove.svg", aria: { hidden: true }, size: 24 %>
+ Clear
+ <% end %>
+ <% end %>
+
+
diff --git a/app/views/bubbles/index.html.erb b/app/views/bubbles/index.html.erb
index aacfebfd8..d1107512f 100644
--- a/app/views/bubbles/index.html.erb
+++ b/app/views/bubbles/index.html.erb
@@ -8,88 +8,7 @@
<% end %>
-
-
-
-
-
- in
-
-
-
-
-
-
-
- <% if @tag %>
- Tagged
-
-
-
-
-
-
- <%= link_to bucket_bubbles_path(@bucket), class: "btn", style: "font-size: 0.4em;" do %>
- <%= image_tag "remove.svg", aria: { hidden: true }, size: 24 %>
- Clear
- <% end %>
- <% else %>
- with
-
-
-
-
-
- <% end %>
- and
-
-
-
-
-
+ <%= render "bubbles/filters", bucket: @bucket, tag: @tag, assignee: @assignee %>
<%= button_to bucket_bubbles_path(@bucket), method: :post, class: "btn btn--plain", form_class: "flex-item-justify-end" do %>
@@ -107,6 +26,9 @@
diff --git a/config/brakeman.ignore b/config/brakeman.ignore
index 1ab2530ac..add1499e7 100644
--- a/config/brakeman.ignore
+++ b/config/brakeman.ignore
@@ -22,42 +22,8 @@
89
],
"note": ""
- },
- {
- "warning_type": "Dynamic Render Path",
- "warning_code": 15,
- "fingerprint": "95ded3afec947789921bb5e8ce5d29bd8b2e1a7be03623ecd8810051769ef72d",
- "check_name": "Render",
- "message": "Render path contains parameter value",
- "file": "app/views/bubbles/index.html.erb",
- "line": 103,
- "link": "https://brakemanscanner.org/docs/warning_types/dynamic_render_path/",
- "code": "render(action => @bucket.bubbles.not_popped.reverse_chronologically.mentioning(params[:filter]).ordered_by_activity.limit(10).tagged_with(Current.account.tags.find(params[:tag_id])), {})",
- "render_path": [
- {
- "type": "controller",
- "class": "BubblesController",
- "method": "index",
- "line": 16,
- "file": "app/controllers/bubbles_controller.rb",
- "rendered": {
- "name": "bubbles/index",
- "file": "app/views/bubbles/index.html.erb"
- }
- }
- ],
- "location": {
- "type": "template",
- "template": "bubbles/index"
- },
- "user_input": "params[:tag_id]",
- "confidence": "Weak",
- "cwe_id": [
- 22
- ],
- "note": ""
}
],
- "updated": "2024-10-03 16:25:56 +0100",
+ "updated": "2024-10-03 15:28:53 -0400",
"brakeman_version": "6.2.1"
}