Skip to content

Commit 4814bda

Browse files
use flat concatenation instead of nesting
1 parent eab3019 commit 4814bda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/cancan/model_adapters/active_record_adapter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def merge_non_empty_conditions(behavior, conditions_hash, sql)
202202
when false_sql
203203
behavior ? conditions : false_sql
204204
else
205-
behavior ? "(#{conditions}) OR (#{sql})" : "not (#{conditions}) AND (#{sql})"
205+
behavior ? "(#{conditions}) OR #{sql}" : "(not (#{conditions}) AND #{sql})"
206206
end
207207
end
208208

0 commit comments

Comments
 (0)