Skip to content

Commit

Permalink
Lint adapter query strategies (#781)
Browse files Browse the repository at this point in the history
  • Loading branch information
Liberatys authored Mar 30, 2022
1 parent 9c75a78 commit be14fda
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: false

module CanCan
module ModelAdapters
class Strategies
Expand All @@ -15,7 +17,7 @@ def double_exists_sql
double_exists_sql = ''

compressed_rules.each_with_index do |rule, index|
double_exists_sql << ' OR ' if index > 0
double_exists_sql << ' OR ' if index.positive?
double_exists_sql << "EXISTS (#{sub_query_for_rule(rule).to_sql})"
end

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module CanCan
module ModelAdapters
class Strategies
Expand Down

0 comments on commit be14fda

Please sign in to comment.