Added possibility to give feedbacks via ajax form. Closes #2

* Feedback message will send to error_recipients, configured in app_config.yml
This commit is contained in:
Benjamin Meichsner 2009-08-04 15:22:11 +02:00
parent b84ec884bd
commit c7e37fc7b2
12 changed files with 66 additions and 7 deletions

View file

@ -58,6 +58,15 @@ class Mailer < ActionMailer::Base
:transaction => transaction
end
def feedback(user, message)
subject "[Foodsoft] Feeback von #{user.email}"
recipients Foodsoft.config[:notification]["error_recipients"]
from "#{user.nick} <#{user.email}>"
headers 'Sender' => Foodsoft.config[:notification]["sender_address"],
'Errors-To' => Foodsoft.config[:notification]["sender_address"]
body :user => user, :message => message
end
protected
def prepare_system_message(recipient)