Sha256: 455aaad1cb70eaaabc25d2175aa881805a3630fe05ef6ac2d1cafe33dc128ba4

Contents?: true

Size: 845 Bytes

Versions: 6

Compression:

Stored size: 845 Bytes

Contents

class FriendMailer < ActionMailer::Base
  unloadable
  layout 'email_default'
  default_url_options[:host] = GlobalConfig.application_url
  
  def follow(inviter, invited)
    setup_email(invited.email)
    subject       I18n.t('muck.friends.following_you', :name => inviter.login, :application_name => GlobalConfig.application_name)
    body          :inviter => inviter, :invited => invited
  end

  def friend_request(inviter, invited)
    setup_email(invited.email)
    subject       I18n.t('muck.friends.friend_request', :name => inviter.login, :application_name => GlobalConfig.application_name)
    body          :inviter => inviter, :invited => invited
  end
  
  protected
  def setup_email(email)
    recipients  email
    from        "#{GlobalConfig.from_email_name} <#{GlobalConfig.from_email}>"
    sent_on     Time.now
  end
  
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
muck-friends-0.1.5 app/models/friend_mailer.rb
muck-friends-0.1.6 app/models/friend_mailer.rb
muck-friends-0.1.1 app/models/friend_mailer.rb
muck-friends-0.1.2 app/models/friend_mailer.rb
muck-friends-0.1.3 app/models/friend_mailer.rb
muck-friends-0.1.4 app/models/friend_mailer.rb