Class: Msg::Envelope
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Msg::Envelope
- Defined in:
- app/models/msg/envelope.rb
Instance Method Summary collapse
Instance Method Details
#message ⇒ Object
17 18 19 |
# File 'app/models/msg/envelope.rb', line 17 def sending. end |
#open! ⇒ Object
21 22 23 |
# File 'app/models/msg/envelope.rb', line 21 def open! update_column(:opened_at, Time.now) end |
#status ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'app/models/msg/envelope.rb', line 25 def status if opened_at? "read" elsif bounces.any? "bounced" else "unread" end end |