app/models/spotlight/lock.rb in blacklight-spotlight-0.34.1 vs app/models/spotlight/lock.rb in blacklight-spotlight-1.0.0.alpha1
- old
+ new
@@ -1,10 +1,10 @@
module Spotlight
##
# Page-level locking to discourage update conflicts
class Lock < ActiveRecord::Base
belongs_to :on, polymorphic: true
- belongs_to :by, polymorphic: true
+ belongs_to :by, polymorphic: true, optional: true
def current_session!
@current_session = true
end