fixes to dmail ui

This commit is contained in:
albert
2011-10-16 01:58:16 -04:00
parent a7267cf00b
commit 1e49a00150
14 changed files with 40 additions and 24 deletions

View File

@@ -9,7 +9,7 @@ class Dmail < ActiveRecord::Base
belongs_to :from, :class_name => "User"
after_create :update_recipient
after_create :send_dmail
attr_accessible :title, :body, :is_deleted, :to_id, :to
attr_accessible :title, :body, :is_deleted, :to_id, :to, :to_name
scope :for, lambda {|user| where(["owner_id = ?", user])}
scope :inbox, where("to_id = owner_id")
scope :sent, where("from_id = owner_id")