amatsuda / database_rewinder

minimalist's tiny and ultra-fast database cleaner
MIT License
807 stars 91 forks source link

Using multiple connections #25

Closed rzane closed 9 years ago

rzane commented 9 years ago

Is there any way to clean multiple databases?

amatsuda commented 9 years ago

@rzane Just as you do for DatabaseCleaner,

DatabaseRewinder[:active_record, connection: 'database_connection_name']
DatabaseRewinder[:active_record, connection: 'database_connection_name2']
DatabaseRewinder[:active_record, connection: 'database_connection_name3']
...

would work.

Also. I just added a simpler form for configuring the same thing.

DatabaseRewinder['database_connection_name']

This would be available with gems '>= 0.5.1'

rzane commented 9 years ago

Works like a charm! Thanks for the quick update.

amatsuda commented 9 years ago

:cake: