Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add dynamic counts to search filters #5471
Add dynamic counts to search filters #5471
Changes from 8 commits
cc610d6
810fa47
84872dc
0447296
b7a03dc
bf8764c
6f71249
ab642b6
fb772c4
a51f6c2
8beadd3
b7dfa43
95138fe
befc03a
f37d232
4e7e410
8dde4f7
b11b565
5293075
3459c41
46acf6f
f39264f
60c073c
2e3ebcc
8792545
62a16f8
57110bb
457f928
8fa9e88
7030d61
bebda0f
3d2e327
8d92875
f07a7d3
2c80ae8
f9be4c9
98bdf22
2d22ea1
559b800
0d95942
d413a4a
16763ba
609dcec
f2215c4
7e581df
deb9809
a0cde25
4a5c754
fae53bd
c40bbdc
f7b5ec8
e9e0887
e89c14a
9f054c6
ff66570
698b7b9
632fdde
edd9fca
b934156
da4d108
726a1d6
174fc2a
adf67d8
1a69157
77d6f3f
f78d162
0e89451
8e2ce0b
b8171b2
14528ea
9d872d8
25930a7
21dd7dd
4c0adbc
52025b1
1f11ba3
a5c64f2
e7a4ac7
0c2bc88
2c4b3cf
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 50 in app/assets/javascripts/components/search/dropdown_filter.ts
Codecov / codecov/patch
app/assets/javascripts/components/search/dropdown_filter.ts#L50
Check warning on line 53 in app/assets/javascripts/components/search/filter_collection_element.ts
Codecov / codecov/patch
app/assets/javascripts/components/search/filter_collection_element.ts#L53
Check warning on line 57 in app/assets/javascripts/components/search/filter_collection_element.ts
Codecov / codecov/patch
app/assets/javascripts/components/search/filter_collection_element.ts#L57
Check warning on line 61 in app/assets/javascripts/components/search/filter_collection_element.ts
Codecov / codecov/patch
app/assets/javascripts/components/search/filter_collection_element.ts#L61
Check warning on line 26 in app/assets/javascripts/components/search/standalone-dropdown-filter.ts
Codecov / codecov/patch
app/assets/javascripts/components/search/standalone-dropdown-filter.ts#L26
Check warning on line 7 in app/controllers/concerns/has_filter.rb
Codecov / codecov/patch
app/controllers/concerns/has_filter.rb#L7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does
part
come from? Can a user inject something here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the query string by the user (so user generated text)
But it is give as the second argument for a where query that uses a
?
. When replacing a?
rails will handle the proper escaping to avoid sql injectionCheck warning on line 25 in app/models/concerns/filterable.rb
Codecov / codecov/patch
app/models/concerns/filterable.rb#L24-L25
Check warning on line 27 in app/models/concerns/filterable.rb
Codecov / codecov/patch
app/models/concerns/filterable.rb#L27