There was an error while loading. Please reload this page.
1 parent 855abc9 commit 573bd78Copy full SHA for 573bd78
lib/database_cleaner/cleaners.rb
@@ -7,9 +7,9 @@ def initialize hash={}
7
end
8
9
# FIXME this method conflates creation with lookup... both a command and a query. yuck.
10
- def [](orm, opts = {})
+ def [](orm, **opts)
11
raise ArgumentError if orm.nil?
12
- fetch([orm, opts]) { add_cleaner(orm, opts) }
+ fetch([orm, opts]) { add_cleaner(orm, **opts) }
13
14
15
def strategy=(strategy)
@@ -37,8 +37,8 @@ def clean_with(*args)
37
38
private
39
40
- def add_cleaner(orm, opts = {})
41
- self[[orm, opts]] = Cleaner.new(orm, opts)
+ def add_cleaner(orm, **opts)
+ self[[orm, opts]] = Cleaner.new(orm, **opts)
42
43
44
def remove_duplicates
0 commit comments