Created
November 18, 2013 22:48
-
-
Save hoan006/7536774 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module EventMessage | |
def self.include(klass) | |
klass.instance_eval do | |
include Mongoid::Document | |
field :uid, as: :user_id | |
field :et, as: :event_type, type: Integer | |
field :emd, as: :event_metadata, type: Hash | |
field :ts, as: :timestamp, type: Integer, default: Time.now.to_i | |
belongs_to :user, foreign_key: :uid, index: true | |
end | |
end | |
def message_object | |
... | |
end | |
def message | |
... | |
end | |
def message_text | |
... | |
end | |
end | |
module EventApnSender | |
def send_apns | |
... | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment