Sha256: d1010af93f327735f0b795e298846ac0e1c4523dc6862af54f1e30a54ee5b105

Contents?: true

Size: 547 Bytes

Versions: 19

Compression:

Stored size: 547 Bytes

Contents

module MailSpy
  class Action
    include Mongoid::Document
    include Mongoid::Timestamps

    ACTION_TYPE_OPEN = 'open'
    ACTION_TYPE_CLICK = 'click'
    ACTION_TYPE_BOUNCE = 'bounce'
    ACTION_TYPE_UNSUBSCRIBE = 'unsubscribe'
    ACTION_TYPE_SPAM = 'spam'

    field :action_type, :type => String
    field :count, :type => Integer, :default => 1
    field :details, :type => Hash
    embedded_in :email, :class_name => "MailSpy::Email"


    def details
      self.read_attribute(:details).try(:with_indifferent_access)
    end

  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
mail_spy-0.1.1 app/models/mail_spy/action.rb
mail_spy-0.1.0 app/models/mail_spy/action.rb
mail_spy-0.0.18 app/models/mail_spy/action.rb
mail_spy-0.0.17 app/models/mail_spy/action.rb
mail_spy-0.0.16 app/models/mail_spy/action.rb
mail_spy-0.0.15 app/models/mail_spy/action.rb
mail_spy-0.0.14 app/models/mail_spy/action.rb
mail_spy-0.0.13 app/models/mail_spy/action.rb
mail_spy-0.0.12 app/models/mail_spy/action.rb
mail_spy-0.0.11 app/models/mail_spy/action.rb
mail_spy-0.0.10 app/models/mail_spy/action.rb
mail_spy-0.0.9 app/models/mail_spy/action.rb
mail_spy-0.0.8 app/models/mail_spy/action.rb
mail_spy-0.0.7 app/models/mail_spy/action.rb
mail_spy-0.0.6 app/models/mail_spy/action.rb
mail_spy-0.0.5 app/models/mail_spy/action.rb
mail_spy-0.0.4 app/models/mail_spy/action.rb
mail_spy-0.0.3 app/models/mail_spy/action.rb
mail_spy-0.0.2 app/models/mail_spy/action.rb