Sha256: 52d6390b753999614e67d6c7955af6ac895be420a55fcec82d306669c37bf67b

Contents?: true

Size: 303 Bytes

Versions: 9

Compression:

Stored size: 303 Bytes

Contents

class Ahoy::Event
  include Mongoid::Document

  # associations
  belongs_to :visit, class_name: "Ahoy::Visit", index: true
  belongs_to :user, index: true, optional: true

  # fields
  field :name, type: String
  field :properties, type: Hash
  field :time, type: Time

  index({name: 1, time: 1})
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ahoy_matey-5.2.1 lib/generators/ahoy/templates/mongoid_event_model.rb.tt
ahoy_matey-5.2.0 lib/generators/ahoy/templates/mongoid_event_model.rb.tt
ahoy_matey-5.1.0 lib/generators/ahoy/templates/mongoid_event_model.rb.tt
ahoy_matey-5.0.2 lib/generators/ahoy/templates/mongoid_event_model.rb.tt
ahoy_matey-5.0.1 lib/generators/ahoy/templates/mongoid_event_model.rb.tt
ahoy_matey-5.0.0 lib/generators/ahoy/templates/mongoid_event_model.rb.tt
ahoy_matey-4.2.1 lib/generators/ahoy/templates/mongoid_event_model.rb.tt
ahoy_matey-4.2.0 lib/generators/ahoy/templates/mongoid_event_model.rb.tt
ahoy_matey-4.1.0 lib/generators/ahoy/templates/mongoid_event_model.rb.tt