use has_attribute? as per https://github.com/rails/rails/issues/4208