2014-05-25 23:59:03 +02:00
|
|
|
# Preview all emails at http://localhost:3000/rails/mailers/event_mailer
|
|
|
|
class EventMailerPreview < ActionMailer::Preview
|
|
|
|
# Preview this email at http://localhost:3000/rails/mailers/event_mailer/create
|
|
|
|
def create
|
|
|
|
ActionMailer::Base.default_url_options[:host] = 'localhost:3000'
|
2014-07-01 15:50:39 +02:00
|
|
|
EventMailer.create Event.last
|
2014-05-25 23:59:03 +02:00
|
|
|
end
|
2014-07-01 21:55:38 +02:00
|
|
|
|
2014-07-01 22:17:57 +02:00
|
|
|
# Preview this email at http://localhost:3000/rails/mailers/event_mailer/accept
|
|
|
|
def accept
|
2014-07-01 21:55:38 +02:00
|
|
|
ActionMailer::Base.default_url_options[:host] = 'localhost:3000'
|
2015-10-22 21:14:36 +02:00
|
|
|
EventMailer.accept Event.last
|
2014-07-01 21:55:38 +02:00
|
|
|
end
|
2014-07-07 13:14:17 +02:00
|
|
|
|
2017-10-21 20:21:25 +02:00
|
|
|
# Preview this email at http://localhost:3000/rails/mailers/event_mailer/update
|
|
|
|
def update
|
|
|
|
ActionMailer::Base.default_url_options[:host] = 'localhost:3000'
|
|
|
|
event = Event.first
|
|
|
|
|
|
|
|
event.start_time += 1.day
|
2017-11-11 12:44:09 +01:00
|
|
|
event.description = event.description + '<p> et</p>
|
|
|
|
<p> hello world</p>'
|
2017-10-21 20:21:25 +02:00
|
|
|
|
|
|
|
EventMailer.update event
|
|
|
|
end
|
|
|
|
|
2014-07-07 13:14:17 +02:00
|
|
|
# Preview this email at http://localhost:3000/rails/mailers/event_mailer/destroy
|
|
|
|
def destroy
|
|
|
|
ActionMailer::Base.default_url_options[:host] = 'localhost:3000'
|
2015-10-22 21:14:36 +02:00
|
|
|
event = Event.last
|
2016-05-21 12:02:19 +02:00
|
|
|
event.reason = 'hello world'
|
2015-10-22 21:14:36 +02:00
|
|
|
EventMailer.destroy event
|
2014-07-07 13:14:17 +02:00
|
|
|
end
|
2014-05-25 23:59:03 +02:00
|
|
|
end
|