Fixed bugs from last commit and in ExceptionNotification-config.

This commit is contained in:
Benjamin Meichsner 2009-02-02 17:12:08 +01:00
parent 0a2a79237a
commit aec93d4b73
4 changed files with 6 additions and 5 deletions

View File

@ -23,6 +23,7 @@ class User < ActiveRecord::Base
has_many :memberships, :dependent => :destroy
has_many :groups, :through => :memberships
has_one :ordergroup, :through => :memberships, :source => :group, :class_name => "Ordergroup"
has_many :workgroups, :through => :memberships, :source => :group, :class_name => "Workgroup"
has_many :assignments, :dependent => :destroy
has_many :tasks, :through => :assignments
has_many :send_messages, :class_name => "Message", :foreign_key => "sender_id"

View File

@ -24,5 +24,5 @@
%td=h user.email if @current_user.role_admin? || user.settings["profile.emailIsPublic"] == '1'
%td=h user.phone if @current_user.role_admin? || user.settings["profile.phoneIsPublic"] == '1'
%td=h user.ordergroup_name
%td=h groups.select { |group| !group.is_a?(Ordergroup) }.collect(&:name).join(', ')
%td=h user.workgroups.collect(&:name).join(', ')

View File

@ -24,7 +24,7 @@ development: &defaults
notification:
error_recipients:
- admin@myfoodcoop.org
sender_address: FoodSoft Error <foodsoft@myfoodcoop.org>
sender_address: "\"FoodSoft Error\" <foodsoft@myfoodcoop.org>"
email_prefix: "[FoodSoft]"
# Access to sharedLists, the external article-database

View File

@ -4,6 +4,6 @@ APP_CONFIG = YAML.load(raw_config)[RAILS_ENV].symbolize_keys
# Configuration of the exception_notification plugin
# Mailadresses are set in config/foodsoft.yaml
ExceptionNotifier.exception_recipients = APP_CONFIG[:error_recipients]
ExceptionNotifier.sender_address = APP_CONFIG[:sender_address]
ExceptionNotifier.email_prefix = APP_CONFIG[:email_prefix]
ExceptionNotifier.exception_recipients = APP_CONFIG[:notification]['error_recipients']
ExceptionNotifier.sender_address = APP_CONFIG[:notification]['sender_address']
ExceptionNotifier.email_prefix = APP_CONFIG[:notification]['email_prefix']