Class Mailer
In: app/models/mailer.rb
Parent: ActionMailer::Base

Methods

Included Modules

Constants::Urls

Public Instance methods

[Source]

    # File app/models/mailer.rb, line 32
32:   def feedback(mailing)
33:     setup(mailing)
34:     @from = @recipients
35:     @recipients = EMAIL
36:     @body[:visit] = mailing.visit
37:   end

[Source]

    # File app/models/mailer.rb, line 39
39:   def flagged(flag)
40:     set_attributes
41:     @recipients = "info@photocracy.org"
42:     if flag.item_id
43:       subj = "Item #{flag.item_id}"
44:     else
45:       subj = "Comment #{flag.comment_id}"
46:     end
47:     @subject += "Flagged: #{subj}"
48:     @body[:flag] = flag
49:     @body[:visit] = flag.visit
50:   end

def activation(mailing)

 setup(mailing)
 @subject += 'Your account has been activated!'
 @body[:url]  = BASE

end

[Source]

    # File app/models/mailer.rb, line 22
22:   def item(mailing)
23:     setup(mailing)
24:     @subject += "#{mailing.user.login} sent you a photo"
25:     @body[:url] = "#{BASE}items/#{mailing.item_id}"
26:   end

def signup_notification(user)

  setup(user)
  @body[:url]  = "#{BASE}activate/#{user.activation_code}"

end

[Source]

    # File app/models/mailer.rb, line 10
10:   def reset_password(mailing, activation_code)
11:     setup(mailing)
12:     @subject += 'Your password has been reset'
13:     @body[:url]  = "#{BASE}reset/#{activation_code}"
14:   end

[Source]

    # File app/models/mailer.rb, line 28
28:   def share(mailing)
29:     setup(mailing)
30:   end

Protected Instance methods

[Source]

    # File app/models/mailer.rb, line 59
59:     def set_attributes
60:       content_type "text/html"
61:       @from        = 'info@photocracy.org'
62:       @subject = "[Photocracy.org] "
63:       @content_type = "text/html"
64:       @sent_on = Time.now
65:     end

[Source]

    # File app/models/mailer.rb, line 53
53:     def setup(mailing)
54:       set_attributes
55:       @recipients  = "#{mailing.email}"
56:       @body[:mailing] = mailing
57:     end

[Validate]