This commit is contained in:
r888888888
2014-02-21 13:46:45 -08:00
parent 2561ccd00b
commit 10516c9834
4 changed files with 12 additions and 4 deletions

View File

@@ -37,7 +37,7 @@ class DmailsController < ApplicationController
end
def create
@dmail = Dmail.create_split(params[:dmail])
@dmail = Dmail.create_split(params[:dmail].merge(:creator_ip_addr => request.remote_ip))
respond_with(@dmail)
end

View File

@@ -10,7 +10,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, :to_name
attr_accessible :title, :body, :is_deleted, :to_id, :to, :to_name, :creator_ip_addr
module AddressMethods
def to_name