From 07294fe85dbf3b151db17eae7a12bbc49a364c2d Mon Sep 17 00:00:00 2001 From: Saverio Trioni Date: Tue, 31 Dec 2013 12:37:09 +0100 Subject: [PATCH] Adding order to a has_many without a lambda is deprecated. --- app/models/organization.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/organization.rb b/app/models/organization.rb index e0de9c3..25abb8a 100644 --- a/app/models/organization.rb +++ b/app/models/organization.rb @@ -1,7 +1,7 @@ class Organization < ActiveRecord::Base validates_uniqueness_of :name has_many :members - has_many :users, through: :members, order: "members.created_at DESC" + has_many :users, -> { order "members.created_at DESC" }, through: :members has_one :account, as: :accountable after_create :create_account