You don't need to update here because the only attribute is the name and you know that a record already exists with that value (otherwise the where statement would have returned nothing). In fact you can simplify this to one line:

```ruby
Resource.create(name: row[0]) if Resource.where(name: row[0]).empty?
```