Removed gettext and simplified_localization-plugin. L18n is now the appropriate module.

Upgraded to rails 2.2.2 and replaced complex foodsoft.rb-loader with simple
initializers/load_app_config.rb. Multiple foodcoops option is temporarly deactivated.
This commit is contained in:
Benjamin Meichsner 2009-01-06 15:45:19 +01:00
parent 5b9a7e05df
commit 9f8d0d28ac
121 changed files with 1197 additions and 15237 deletions

View file

@ -12,6 +12,7 @@ require 'digest/sha1'
class User < ActiveRecord::Base
has_many :memberships, :dependent => :destroy
has_many :groups, :through => :memberships
has_many :order_groups, :through => :memberships, :source => :group
has_many :assignments, :dependent => :destroy
has_many :tasks, :through => :assignments
@ -119,8 +120,9 @@ class User < ActiveRecord::Base
end
# Returns the user's OrderGroup or nil if none found.
def find_ordergroup
groups.find(:first, :conditions => "type = 'OrderGroup'")
def find_ordergroup
order_groups.first
#groups.find(:first, :conditions => "type = 'OrderGroup'")
end
# Find all tasks, for which the current user should be responsible