2015-07-25 18:32:27 +02:00
|
|
|
# Preview all emails at http://localhost:3000/rails/mailers/orga_mailer
|
|
|
|
class OrgaMailerPreview < ActionMailer::Preview
|
|
|
|
# Preview this email at http://localhost:3000/rails/mailers/orga_mailer/create
|
|
|
|
def create
|
|
|
|
ActionMailer::Base.default_url_options[:host] = 'localhost:3000'
|
|
|
|
OrgaMailer.create Orga.last
|
|
|
|
end
|
|
|
|
|
|
|
|
# Preview this email at http://localhost:3000/rails/mailers/orga_mailer/update
|
|
|
|
def update
|
|
|
|
ActionMailer::Base.default_url_options[:host] = 'localhost:3000'
|
2015-09-05 18:56:48 +02:00
|
|
|
orga = Orga.last
|
2016-11-07 22:30:44 +01:00
|
|
|
|
2015-09-05 18:56:48 +02:00
|
|
|
orga.name += ' et hop'
|
|
|
|
orga.save!
|
|
|
|
OrgaMailer.update orga
|
2015-07-25 18:32:27 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
# Preview this email at http://localhost:3000/rails/mailers/orga_mailer/accept
|
|
|
|
def accept
|
|
|
|
ActionMailer::Base.default_url_options[:host] = 'localhost:3000'
|
|
|
|
OrgaMailer.accept Orga.last
|
|
|
|
end
|
|
|
|
|
|
|
|
# Preview this email at http://localhost:3000/rails/mailers/orga_mailer/destroy
|
|
|
|
def destroy
|
|
|
|
ActionMailer::Base.default_url_options[:host] = 'localhost:3000'
|
2015-10-22 21:14:36 +02:00
|
|
|
orga = Orga.last
|
2016-05-21 12:02:19 +02:00
|
|
|
# orga.reason = 'hello world'
|
2015-10-22 21:14:36 +02:00
|
|
|
OrgaMailer.destroy orga
|
2015-07-25 18:32:27 +02:00
|
|
|
end
|
|
|
|
end
|