style tweaks

This commit is contained in:
albert
2012-04-20 18:01:09 -04:00
parent fcae4bc82e
commit ec97b6aaf9
5 changed files with 22 additions and 3 deletions

View File

@@ -438,5 +438,13 @@ class User < ActiveRecord::Base
def can_update?(object, foreign_key = :user_id)
is_moderator? || is_admin? || object.__send__(foreign_key) == id
end
def dmail_count
if has_mail?
"(#{dmails.unread.count})"
else
""
end
end
end