Blog Archives

Invalid mix of scope block and deprecated finder options on ActiveRecord association

While upgrading from rails 3.2.22.5 to rails 4.2.6 has_many :subitems, through: :child_associations, source: :child, source_type: ‘ContentItem’, conditions: ‘content_items.deleted 1’, order: ‘content_associations.position ASC’ Replaced conditions with proc has_many :subitems, ->{where(‘content_items.deleted 1’)}, through: :child_associations, source: :child, source_type: ‘ContentItem’,  order: ‘content_associations.position ASC’ 2.

Posted in Uncategorized, upgrade from rails 3 to 4
StackOverFlow
Categories
Archives