Remove send_mail to admin.
This commit is contained in:
parent
5d7769270a
commit
24c8845f28
|
@ -74,8 +74,7 @@ class Admin::PropertyHiresController < OrbitAdminController
|
|||
|
||||
def destroy
|
||||
property = Property.find(params[:id]) rescue nil
|
||||
email = Array(MemberProfile.find(property.owners)).collect{|v| v.email} rescue []
|
||||
email = User.all.select{|v| v.is_admin? && v.user_name != 'rulingcom'}.collect{|v| v.member_profile.email} if email.length == 0
|
||||
email = MemberProfile.where(:id.in=>property.owners).collect{|v| v.email}
|
||||
Admin::PropertyHiresHelper::HireMethod.send_mail('delete',email,property.id,nil,nil,current_user.id)
|
||||
property.destroy if !property.nil?
|
||||
if params[:page]
|
||||
|
@ -110,8 +109,7 @@ class Admin::PropertyHiresController < OrbitAdminController
|
|||
property.p_hire_fields.each{|t| t.destroy if t["to_delete"] == true}
|
||||
else
|
||||
property.update_attributes(@property_params)
|
||||
email = Array(MemberProfile.find(property.owners)).collect{|v| v.email} rescue []
|
||||
email = User.all.select{|v| v.is_admin? && v.user_name != 'rulingcom'}.collect{|v| v.member_profile.email} if email.length == 0
|
||||
email = MemberProfile.where(:id.in=>property.owners).collect{|v| v.email}
|
||||
Admin::PropertyHiresHelper::HireMethod.send_mail('edit',email,property.id,nil,nil,current_user.id)
|
||||
end
|
||||
redirect_to params[:referer_url]
|
||||
|
|
|
@ -280,8 +280,7 @@ class PropertyHiresController < ApplicationController
|
|||
hire.passed = true if PropertyHireSetting.auto_approve_enabled?
|
||||
hire.save
|
||||
if !property.nil? && !is_admin_page
|
||||
email = Array(MemberProfile.find(property.owners)).collect{|v| v.email} rescue []
|
||||
email = User.all.select{|v| v.is_admin? && v.user_name != 'rulingcom'}.collect{|v| v.member_profile.email} if email.length == 0
|
||||
email = MemberProfile.where(:id.in=>property.owners).collect{|v| v.email}
|
||||
email << hire.hiring_person_email
|
||||
email = email.select{|e| e.present?}
|
||||
Admin::PropertyHiresHelper::HireMethod.send_mail('p_hire',email,property.id,nil,hire.id,(current_user.id rescue nil))
|
||||
|
|
Loading…
Reference in New Issue