I'd rewrite this as: Host.unscoped.where(:managed => nil).update_all(:managed => false).
ActiveRecord > 4 doesn't support conditions in update_all.