Skip to content

Commit 05320e3

Browse files
committed
use unless instead of if !
1 parent 5f608fc commit 05320e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

activerecord/lib/active_record/associations/association_collection.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ def construct_find_options!(options)
372372
def load_target
373373
if @owner.persisted? || foreign_key_present
374374
begin
375-
if !loaded?
375+
unless loaded?
376376
if @target.is_a?(Array) && @target.any?
377377
@target = find_target.map do |f|
378378
i = @target.index(f)

0 commit comments

Comments
 (0)