26 lines
906 B
Ruby
26 lines
906 B
Ruby
|
require 'differ'
|
||
|
|
||
|
# 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'
|
||
|
ModerationMailer.create(Event.last)
|
||
|
end
|
||
|
|
||
|
# Preview this email at http://localhost:3000/rails/mailers/moderation_mailer/update
|
||
|
def update
|
||
|
ActionMailer::Base.default_url_options[:host] = 'localhost:3000'
|
||
|
event = Event.last
|
||
|
event.description = event.description + '
|
||
|
hello world'
|
||
|
ModerationMailer.update(event, User.last)
|
||
|
end
|
||
|
|
||
|
# Preview this email at http://localhost:3000/rails/mailers/moderation_mailer/moderate
|
||
|
def moderate
|
||
|
ActionMailer::Base.default_url_options[:host] = 'localhost:3000'
|
||
|
ModerationMailer.moderate(Event.last, User.last)
|
||
|
end
|
||
|
end
|