API.md in row_boat-0.2.0 vs API.md in row_boat-0.3.0

- old
+ new

@@ -15,10 +15,11 @@ - [`preprocess_rows`](#preprocess_rows) - [`options`](#options) - [`handle_failed_row`](#handle_failed_row) - [`handle_failed_rows`](#handle_failed_rows) - [`value_converters`](#value_converters) +- [`rollback_transaction?`](#rollback_transaction) ## Basic Usage Just subclass `RowBoat::Base` and define the [`import_into`](#import_into) and [`column_mapping`](#column_mapping) methods to get started (They're the only methods that you're required to implement). @@ -359,8 +360,27 @@ end module DescriptionConverter def self.convert(value) value.present? ? value : "default description :(" + end +end +``` + +## `rollback_transaction?` + +### Description + +Implement this method if you'd like to rollback the transaction after it otherwise has completed. + +Note: imports are only wrapped in a transaction if the `wrap_in_transaction` option is `true`. It defaults to `true` but this can be configured in [`options`](#options) + +### Example + +```ruby +class ImportProduct < RowBoat::Base + # required configuration omitted for brevity + def rollback_transaction? + CsvService.already_imported?(csv_source) end end ```