app/models/spotlight/lock.rb in blacklight-spotlight-0.4.1 vs app/models/spotlight/lock.rb in blacklight-spotlight-0.5.0

- old
+ new

@@ -1,6 +1,8 @@ module Spotlight + ## + # Page-level locking to discourage update conflicts class Lock < ActiveRecord::Base belongs_to :on, polymorphic: true belongs_to :by, polymorphic: true def current_session! @@ -10,10 +12,9 @@ def current_session? !!@current_session end def stale? - created_at < (Time.now - 12.hours) + created_at < (Time.zone.now - 12.hours) end - end -end \ No newline at end of file +end