Skip to content

Commit

Permalink
[#52147] fix cop errors
Browse files Browse the repository at this point in the history
  • Loading branch information
EinLama committed Oct 14, 2024
1 parent 302770f commit e2550a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion app/helpers/sort_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@
# - Introduces instance variables: @sort_default, @sort_criteria
# - Introduces param :sort
#

# rubocop:disable Lint/RedundantCopDisableDirective, Rails/HelperInstanceVariable
# TODO: We should not use instance variables in our rails helpers. Since this is a bigger piece of work, for now
# we just disable the respective cop. Due to a bug, we must also disable the redundancy cop.
module SortHelper
class SortCriteria
attr_reader :criteria
Expand Down Expand Up @@ -554,3 +556,4 @@ def get_caption(column, options)
caption
end
end
# rubocop:enable Rails/HelperInstanceVariable, Lint/RedundantCopDisableDirective
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ export default class TableActionMenuController extends Controller {
}
}

filterBy(event: Event) {
filterBy(event:Event) {
// Sometimes the filterController was not loaded during `connect`, so we try again here:
if (!this.filterController) { this.findFilterController() }
if (!this.filterController) { this.findFilterController(); }

const button = event.currentTarget as HTMLElement;

Expand Down

0 comments on commit e2550a5

Please sign in to comment.