Update party.rb
We change setting the edit key to use the conditional assignment operator so that it doesn't get overridden when we're running tests. This shouldn't have an effect in production.
This commit is contained in:
parent
52d417a693
commit
85402cc778
1 changed files with 1 additions and 1 deletions
|
|
@ -219,7 +219,7 @@ class Party < ApplicationRecord
|
||||||
def set_edit_key
|
def set_edit_key
|
||||||
return if user
|
return if user
|
||||||
|
|
||||||
self.edit_key = Digest::SHA1.hexdigest([Time.now, rand].join)
|
self.edit_key ||= Digest::SHA1.hexdigest([Time.now, rand].join)
|
||||||
end
|
end
|
||||||
|
|
||||||
def random_string
|
def random_string
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue