various gpx bits
[rails.git] / app / models / notifier.rb
1 class Notifier < ActionMailer::Base
2
3   def signup_confirm( user )
4     @recipients = user.email
5     @from = 'abuse@openstreetmap.org'
6     @subject = '[OpenStreetMap] Confirm your email address'
7     @body['url'] = 'http://www.openstreetmap.org/user/confirm?confirm_string=' + user.token
8   end
9
10   def lost_password( user )
11     @recipients = user.email
12     @from = 'abuse@openstreetmap.org'
13     @subject = '[OpenStreetMap] Password reset request'
14     @body['url'] = "http://www.openstreetmap.org/user/reset_password?email=#{user.email}&token=#{user.token}"
15   end
16
17   def reset_password(user, pass)
18     @recipients = user.email
19     @from = 'abuse@openstreetmap.org'
20     @subject = '[OpenStreetMap] Password reset'
21     @body['pass'] = pass
22   end
23
24   def gpx_success(trace)
25     @recipients = user.email
26     @from = 'abuse@openstreetmap.org'
27     @subject = '[OpenStreetMap] GPX Import success'
28     @body['trace_name'] = trace.name
29     @body['trace_points'] = trace.size
30   end
31
32   def gpx_failure(trace)
33     @recipients = user.email
34     @from = 'abuse@openstreetmap.org'
35     @subject = '[OpenStreetMap] GPX Import failure'
36     @body['trace_name'] = trace.name
37   end
38 end