README.md in ntq_excelsior-0.4.0 vs README.md in ntq_excelsior-0.4.1
- old
+ new
@@ -85,11 +85,11 @@
### Import
```ruby
class UserImporter < NtqExcelsior::Importer
- model_klass User
+ model_klass "User"
primary_key :id
schema({
email: 'Email',
@@ -110,9 +110,14 @@
record.first_name = line[:first_name]
record.last_name = line[:last_name]
end
end
end
+
+importer = UserImporter.new
+importer.file = file
+result = importer.import
+# { success_count: 2, error_lines: [] }
```
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.