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