lib/ahoy/model.rb in ahoy_matey-1.0.0 vs lib/ahoy/model.rb in ahoy_matey-1.0.1
- old
+ new
@@ -11,10 +11,10 @@
belongs_to name, options
before_create :set_visit
end
class_eval %Q{
def set_visit
- self.#{name} ||= RequestStore.store[:ahoy].visit
+ self.#{name} ||= RequestStore.store[:ahoy].try(:visit)
end
}
end
# deprecated