Class: MList::Manager::Database::List

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
List
Defined in:
lib/mlist/manager/database.rb

Instance Method Summary collapse

Methods included from List

#active?, #archive_url, #been_here?, #blocked?, #copy_sender?, #footer_content, #help_url, #list_headers, #owner_url, #post_url, #recipients, #reply_to_list?, #subscribe_url, #subscriber, #subscriber?, #unsubscribe_url

Methods included from List::Callbacks

#blocked_subscriber_post, #bounce, #inactive_post, #non_subscriber_post

Instance Method Details

#labelObject



29
30
31
# File 'lib/mlist/manager/database.rb', line 29

def label
  self[:label]
end

#list_idObject



33
34
35
# File 'lib/mlist/manager/database.rb', line 33

def list_id
  "#{self.class.name}#{id}"
end

#subscribe(address) ⇒ Object



37
38
39
# File 'lib/mlist/manager/database.rb', line 37

def subscribe(address)
  subscribers.find_or_create_by_rfc5322_email(address)
end