Skip to content

Commit

Permalink
Don't use the scope at all for locking
Browse files Browse the repository at this point in the history
  • Loading branch information
Silex committed Oct 10, 2018
1 parent 8bd2545 commit a6e1a82
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions lib/acts_as_list/active_record/acts/list.rb
Expand Up @@ -258,17 +258,7 @@ def set_list_position(new_position, raise_exception_if_save_fails=false)
private

def advisory_lock_name
scope = case scope_name
when Symbol
send(scope_name)
when Array
scope_name.reject{ |e| e.is_a?(Hash) }.map do |e|
read_attribute(e.to_sym)
end.join('-')
else
eval("%{#{scope_name}}")
end
format('lock-%s-%s', acts_as_list_class.to_s.downcase, scope)
format('lock-%s', acts_as_list_class.to_s.downcase)
end

def with_smart_lock
Expand Down

0 comments on commit a6e1a82

Please sign in to comment.