Replacing content.blank? with content.file.nil?. For some reason the former is giving unexpected results on staging.