Skip to content

Commit

Permalink
Allow searching results with tags
Browse files Browse the repository at this point in the history
  • Loading branch information
ahukkanen committed Nov 20, 2024
1 parent 5184842 commit 9a6ae66
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/controllers/decidim/accountability/results_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ def default_filter_params
{
search_text_cont: "",
with_scope: "",
with_category: ""
with_category: "",
with_any_tag: []
}
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ def result_all_details
# Create i18n ransackers for :title and :description.
# Create the :search_text ransacker alias for searching from both of these.
ransacker_i18n_multi :search_text, [:title, :description]

def self.ransackable_scopes(_auth_object = nil)
[:with_category, :with_scope, :with_any_tag]
end
end

class_methods do
Expand Down

0 comments on commit 9a6ae66

Please sign in to comment.