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.…