Adding order to a has_many without a lambda is deprecated.

This commit is contained in:
Saverio Trioni
2013-12-31 12:37:09 +01:00
parent b1a57d2757
commit 07294fe85d
+1 -1
View File
@@ -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