2014-06-09 12:18:40 +02:00
|
|
|
# Preview all emails at http://localhost:3000/rails/mailers/moderation_mailer
|
|
|
|
class ModerationMailerPreview < ActionMailer::Preview
|
|
|
|
# Preview this email at http://localhost:3000/rails/mailers/moderation_mailer/create
|
|
|
|
def create
|
|
|
|
ActionMailer::Base.default_url_options[:host] = 'localhost:3000'
|
2014-07-01 15:50:39 +02:00
|
|
|
ModerationMailer.create Event.last
|
2014-06-09 12:18:40 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
# Preview this email at http://localhost:3000/rails/mailers/moderation_mailer/update
|
|
|
|
def update
|
|
|
|
ActionMailer::Base.default_url_options[:host] = 'localhost:3000'
|
2015-10-22 21:14:36 +02:00
|
|
|
event = Event.first
|
2014-07-20 21:46:28 +02:00
|
|
|
|
2014-09-26 01:26:33 +02:00
|
|
|
event.tags += ' ho'
|
2014-07-20 02:43:13 +02:00
|
|
|
event.start_time += 1.day
|
2014-06-09 12:18:40 +02:00
|
|
|
event.description = event.description + '
|
|
|
|
hello world'
|
2014-07-20 21:46:28 +02:00
|
|
|
|
2015-10-22 21:14:36 +02:00
|
|
|
ModerationMailer.update event
|
2014-06-09 12:18:40 +02:00
|
|
|
end
|
|
|
|
|
2014-07-01 15:50:39 +02:00
|
|
|
# Preview this email at http://localhost:3000/rails/mailers/moderation_mailer/accept
|
|
|
|
def accept
|
2014-06-09 12:18:40 +02:00
|
|
|
ActionMailer::Base.default_url_options[:host] = 'localhost:3000'
|
2015-10-22 21:14:36 +02:00
|
|
|
ModerationMailer.accept Event.last
|
2014-07-01 15:50:39 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
# Preview this email at http://localhost:3000/rails/mailers/moderation_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
|
|
|
ModerationMailer.destroy event
|
2014-06-09 12:18:40 +02:00
|
|
|
end
|
|
|
|
end
|