Skip to content

Commit 83e3782

Browse files
set default to 5 seconds
1 parent 606c157 commit 83e3782

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/closure_tree/support.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,10 @@ def initialize(model_class, options)
2323
:dependent => :nullify, # or :destroy or :delete_all -- see the README
2424
:name_column => 'name',
2525
:with_advisory_lock => true,
26-
:advisory_lock_timeout_seconds => nil,
26+
:advisory_lock_timeout_seconds => 5,
2727
:numeric_order => false
2828
}.merge(options)
2929
raise ArgumentError, "name_column can't be 'path'" if options[:name_column] == 'path'
30-
if !options[:with_advisory_lock] && options[:advisory_lock_timeout_seconds].present?
31-
raise ArgumentError, "advisory_lock_timeout_seconds cannot be provided when advisory lock is disabled"
32-
end
3330
if order_is_numeric?
3431
extend NumericOrderSupport.adapter_for_connection(connection)
3532
end

0 commit comments

Comments
 (0)