Skip to content

Commit

Permalink
use flat concatenation instead of nesting
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikolai-Kircher committed May 28, 2024
1 parent eab3019 commit 4814bda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cancan/model_adapters/active_record_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def merge_non_empty_conditions(behavior, conditions_hash, sql)
when false_sql
behavior ? conditions : false_sql
else
behavior ? "(#{conditions}) OR (#{sql})" : "not (#{conditions}) AND (#{sql})"
behavior ? "(#{conditions}) OR #{sql}" : "(not (#{conditions}) AND #{sql})"
end
end

Expand Down

0 comments on commit 4814bda

Please sign in to comment.