Deprecated warning for Rails 4 has_many with order

前端 未结 5 1875
情话喂你
情话喂你 2020-11-27 14:08
class RelatedList < ActiveRecord::Base
  extend Enumerize

  enumerize :list_type, in: %w(groups projects)

  belongs_to :content
  has_many :contents, :order =&g         


        
5条回答
  •  孤街浪徒
    2020-11-27 14:29

    This works for me with Rails 4 & MongoDB

    has_many :discounts, order: :min_amount.asc
    

提交回复
热议问题