Fix docs about usage of only and except options

This commit is contained in:
Diego Algorta 2021-04-01 17:32:27 -03:00 committed by Micah Geisel
parent a8cfc85ab2
commit 85cd6d097f

View file

@ -75,11 +75,11 @@ DatabaseCleaner.clean
With the `:truncation` strategy you can also pass in options, for example: With the `:truncation` strategy you can also pass in options, for example:
```ruby ```ruby
DatabaseCleaner.strategy = :truncation, only: %w[widgets dogs some_other_table] DatabaseCleaner.strategy = [:truncation, only: %w[widgets dogs some_other_table]]
``` ```
```ruby ```ruby
DatabaseCleaner.strategy = :truncation, except: %w[widgets] DatabaseCleaner.strategy = [:truncation, except: %w[widgets]]
``` ```
(I should point out the truncation strategy will never truncate your schema_migrations table.) (I should point out the truncation strategy will never truncate your schema_migrations table.)