diff options
| author | Kir | 2011-12-14 19:00:37 +0400 |
|---|---|---|
| committer | Kir | 2011-12-14 19:00:37 +0400 |
| commit | 35e185b02d869bd69cd2bec65d4058e967f97aa5 (patch) | |
| tree | 29a96c901c96aa84a31894abab1dd641239bec7e /app/models | |
| parent | 50a241e922ff4b58b3fc3e52162f4e199e1fae3d (diff) | |
| download | inboxes-35e185b02d869bd69cd2bec65d4058e967f97aa5.tar.bz2 | |
Refactoring
Diffstat (limited to 'app/models')
| -rw-r--r-- | app/models/discussion.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/discussion.rb b/app/models/discussion.rb index 7230538..a5b12ca 100644 --- a/app/models/discussion.rb +++ b/app/models/discussion.rb @@ -85,7 +85,7 @@ class Discussion < ActiveRecord::Base end # return amount of unreaded messages for current discussion - def count_unread_mess(user) + def unread_messages_count_for(user) speaker = find_speaker_by_user(user) messages.where("updated_at > ?", speaker.updated_at ).where("user_id != ?", speaker.id ).count end |
