From 5180fe2cd8233169935065efe8762bd5d7b2709c Mon Sep 17 00:00:00 2001 From: Ben Toews Date: Tue, 26 Sep 2017 09:29:24 -0600 Subject: allow table name and direction in string order arg --- activerecord/test/models/company_in_module.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/test/models/company_in_module.rb') diff --git a/activerecord/test/models/company_in_module.rb b/activerecord/test/models/company_in_module.rb index 9108eb5249..52b7e06a63 100644 --- a/activerecord/test/models/company_in_module.rb +++ b/activerecord/test/models/company_in_module.rb @@ -9,7 +9,7 @@ module MyApplication class Firm < Company has_many :clients, -> { order("id") }, dependent: :destroy - has_many :clients_sorted_desc, -> { order(Arel.sql("id DESC")) }, class_name: "Client" + has_many :clients_sorted_desc, -> { order("id DESC") }, class_name: "Client" has_many :clients_of_firm, -> { order "id" }, foreign_key: "client_of", class_name: "Client" has_many :clients_like_ms, -> { where("name = 'Microsoft'").order("id") }, class_name: "Client" has_one :account, class_name: "MyApplication::Billing::Account", dependent: :destroy -- cgit v1.2.3