dmail.rb: make to_name= use User.name_to_id cache.

This commit is contained in:
evazion
2017-02-23 20:03:09 -06:00
parent 2736d31c67
commit 35bf995276

View File

@@ -28,9 +28,7 @@ class Dmail < ActiveRecord::Base
end
def to_name=(name)
user = User.find_by_name(name)
return if user.nil?
self.to_id = user.id
self.to_id = User.name_to_id(name)
end
def initialize_from_id