Class: Newsly::Newsletter
- Inherits:
-
LiquidModel
- Object
- ActiveRecord::Base
- LiquidModel
- Newsly::Newsletter
- Defined in:
- app/models/newsly/newsletter.rb
Instance Method Summary collapse
-
#draft? ⇒ Boolean
return true if never sent or batch_sent.
-
#status ⇒ Object
Returns the status a string.
Methods inherited from LiquidModel
#after_validation, #body=, #render
Instance Method Details
#draft? ⇒ Boolean
return true if never sent or batch_sent
14 15 16 |
# File 'app/models/newsly/newsletter.rb', line 14 def draft? self.sent? || self.batch_sent? ? false : true end |
#status ⇒ Object
Returns the status a string. TODO, make nicer!
21 22 23 24 25 |
# File 'app/models/newsly/newsletter.rb', line 21 def status return "draft" if self.draft? return "sent" if self.sent? return "batch" if self.batch_sent? end |