aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/people_list.rb
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2011-06-09 18:09:52 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2011-06-09 18:09:52 +0100
commit495c44445642cfae8f23fadde299ad5307f5be58 (patch)
tree0104c9eef164235aa5ab05b126c8f63e52fb8624 /lib/mauve/people_list.rb
parent0c88fcc91db1b003cd5d5311f62700c7867b4099 (diff)
Big commit
--HG-- rename : views/please_authenticate.haml => views/login.haml
Diffstat (limited to 'lib/mauve/people_list.rb')
-rw-r--r--lib/mauve/people_list.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/mauve/people_list.rb b/lib/mauve/people_list.rb
index 2e4c737..23e0c1e 100644
--- a/lib/mauve/people_list.rb
+++ b/lib/mauve/people_list.rb
@@ -21,19 +21,21 @@ module Mauve
alias username label
def list
- self[:list]
+ self[:list] || []
end
#
# Set up the logger
def logger
- @logger ||= Log4r::Logger.new self.class
+ @logger ||= Log4r::Logger.new self.class.to_s
end
#
# Return the array of people
#
def people
+ logger.warn "No-one found in the people list for #{self.label}" if self.list.empty?
+
list.collect do |name|
Configuration.current.people.has_key?(name) ? Configuration.current.people[name] : nil
end.reject{|person| person.nil?}