Skip to content

Commit 4c724df

Browse files
committed
1 parent 72005ad commit 4c724df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

activerecord/test/models/company.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def log_after_remove(record)
108108
end
109109

110110
class DependentFirm < Company
111-
has_one :account, foreign_key: "firm_id", dependent: :nullify
111+
has_one :account, -> { order(:id) }, foreign_key: "firm_id", dependent: :nullify
112112
has_many :companies, foreign_key: "client_of", dependent: :nullify
113113
has_one :company, foreign_key: "client_of", dependent: :nullify
114114
end

0 commit comments

Comments
 (0)