0
我有一個與條件具有多態關聯的模型。Rails 4模型關聯條件
然而,這似乎並沒有工作,這聽起來像conditions
在Rails的棄用4
下面是我爲協會代碼:
has_one :top_background, :class_name => 'UploadedFile', as: :imageable,
:conditions => { :imageable_type => 'venue_top_background' }, dependent: :destroy
有沒有辦法讓這個在Rails 4中工作?
這應該與你在找什麼:http://stackoverflow.com/questions/16569994/deprecation-warning-when-using-has-many-through-uniq-in-導軌-4 – Severin