aliases clean methods as ! variants since they are rather destructive -thanks nofxx :)
This commit is contained in:
parent
08fef6fe17
commit
f6ee1fc0bf
|
@ -1,5 +1,8 @@
|
||||||
0.5.x (In Git)
|
0.5.x (In Git)
|
||||||
|
|
||||||
|
=== New features
|
||||||
|
* clean and clean_with methods are now aliased to clean! and clean_with!. (Ben Mabey)
|
||||||
|
|
||||||
== 0.5.0 2010-02-22 - The CouchPotato Release
|
== 0.5.0 2010-02-22 - The CouchPotato Release
|
||||||
|
|
||||||
=== New features
|
=== New features
|
||||||
|
|
|
@ -41,6 +41,8 @@ module DatabaseCleaner
|
||||||
strategy
|
strategy
|
||||||
end
|
end
|
||||||
|
|
||||||
|
alias clean_with! clean_with
|
||||||
|
|
||||||
def strategy=(args)
|
def strategy=(args)
|
||||||
strategy, *strategy_args = args
|
strategy, *strategy_args = args
|
||||||
if strategy.is_a?(Symbol)
|
if strategy.is_a?(Symbol)
|
||||||
|
@ -64,6 +66,8 @@ module DatabaseCleaner
|
||||||
strategy.clean
|
strategy.clean
|
||||||
end
|
end
|
||||||
|
|
||||||
|
alias clean! clean
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def strategy
|
def strategy
|
||||||
|
|
Loading…
Reference in New Issue