Fixed multi coop routing and changed config accessors.
This commit is contained in:
parent
2860a3ca44
commit
ec2e761e7f
28 changed files with 124 additions and 88 deletions
|
|
@ -4,15 +4,15 @@ class Mailer < ActionMailer::Base
|
|||
|
||||
layout 'email' # Use views/layouts/email.txt.erb
|
||||
|
||||
default from: "FoodSoft <#{Foodsoft.config[:email_sender]}>",
|
||||
sender: Foodsoft.config[:email_sender],
|
||||
errors_to: Foodsoft.config[:email_sender]
|
||||
default from: "FoodSoft <#{FoodsoftConfig[:email_sender]}>",
|
||||
sender: FoodsoftConfig[:email_sender],
|
||||
errors_to: FoodsoftConfig[:email_sender]
|
||||
|
||||
# Sends an email copy of the given internal foodsoft message.
|
||||
def foodsoft_message(message, recipient)
|
||||
@message = message
|
||||
|
||||
mail subject: "[#{Foodsoft.config[:name]}] " + message.subject,
|
||||
mail subject: "[#{FoodsoftConfig[:name]}] " + message.subject,
|
||||
to: recipient.email,
|
||||
from: "#{message.sender.nick} <#{message.sender.email}>"
|
||||
end
|
||||
|
|
@ -24,7 +24,7 @@ class Mailer < ActionMailer::Base
|
|||
@link = url_for(:controller => "login", :action => "password", :id => user.id, :token => user.reset_password_token)
|
||||
|
||||
mail :to => user.email,
|
||||
:subject => "[#{Foodsoft.config[:name]}] Neues Passwort für/ New password for #{user.nick}"
|
||||
:subject => "[#{FoodsoftConfig[:name]}] Neues Passwort für/ New password for #{user.nick}"
|
||||
end
|
||||
|
||||
# Sends an invite email.
|
||||
|
|
@ -33,7 +33,7 @@ class Mailer < ActionMailer::Base
|
|||
@link = url_for(:controller => "login", :action => "invite", :id => invite.token)
|
||||
|
||||
mail :to => invite.email,
|
||||
:subject => "Einladung in die Foodcoop #{Foodsoft.config[:name]} - Invitation to the Foodcoop"
|
||||
:subject => "Einladung in die Foodcoop #{FoodsoftConfig[:name]} - Invitation to the Foodcoop"
|
||||
end
|
||||
|
||||
# Notify user of upcoming task.
|
||||
|
|
@ -42,7 +42,7 @@ class Mailer < ActionMailer::Base
|
|||
@task = task
|
||||
|
||||
mail :to => user.email,
|
||||
:subject => "[#{Foodsoft.config[:name]}] Aufgaben werden fällig!"
|
||||
:subject => "[#{FoodsoftConfig[:name]}] Aufgaben werden fällig!"
|
||||
end
|
||||
|
||||
# Sends order result for specific Ordergroup
|
||||
|
|
@ -51,7 +51,7 @@ class Mailer < ActionMailer::Base
|
|||
@group_order = group_order
|
||||
|
||||
mail :to => user.email,
|
||||
:subject => "[#{Foodsoft.config[:name]}] Bestellung beendet: #{group_order.order.name}"
|
||||
:subject => "[#{FoodsoftConfig[:name]}] Bestellung beendet: #{group_order.order.name}"
|
||||
end
|
||||
|
||||
# Notify user if account balance is less than zero
|
||||
|
|
@ -60,17 +60,17 @@ class Mailer < ActionMailer::Base
|
|||
@transaction = transaction
|
||||
|
||||
mail :to => user.email,
|
||||
:subject => "[#{Foodsoft.config[:name]}] Gruppenkonto im Minus"
|
||||
:subject => "[#{FoodsoftConfig[:name]}] Gruppenkonto im Minus"
|
||||
end
|
||||
|
||||
def feedback(user, feedback)
|
||||
@user = user
|
||||
@feedback = feedback
|
||||
|
||||
mail :to => Foodsoft.config[:notification]["error_recipients"],
|
||||
mail :to => FoodsoftConfig[:notification]["error_recipients"],
|
||||
:from => "#{user.nick} <#{user.email}>",
|
||||
:sender => Foodsoft.config[:notification]["sender_address"],
|
||||
:errors_to => Foodsoft.config[:notification]["sender_address"],
|
||||
:sender => FoodsoftConfig[:notification]["sender_address"],
|
||||
:errors_to => FoodsoftConfig[:notification]["sender_address"],
|
||||
:subject => "[Foodsoft] Feeback von #{user.email}"
|
||||
end
|
||||
|
||||
|
|
@ -79,7 +79,7 @@ class Mailer < ActionMailer::Base
|
|||
@user = user
|
||||
|
||||
mail :to => user.email,
|
||||
:subject => "[#{Foodsoft.config[:name]}] \"#{task.name}\" braucht noch Leute!"
|
||||
:subject => "[#{FoodsoftConfig[:name]}] \"#{task.name}\" braucht noch Leute!"
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue