amatsuda / database_rewinder

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

Fix DatabaseRewinder.strategy= method #7

Closed eitoball closed 10 years ago

eitoball commented 11 years ago

When you have DatabaseRewinder.strategy = :truncate, only: ['foos'], the method DatabaseRewinder.strategy= seems to get an array like [:truncate, {:only => ['foos'}].

deeeki commented 10 years ago

FYI, if the method name is like DatabaseRewinder.set_strategy, the keyword arguments are parsed correctly. Unfortunately, we can't use keyword arguments in a method named with =.

So this patch LGTM :star:

amatsuda commented 10 years ago

Whoa, how did I miss this PR? Thank you @eitoball and @deeeki!

deeeki commented 10 years ago

:hand: :smiley: