|
|
|
@ -2283,7 +2283,7 @@ class UsersController < ApplicationController
|
|
|
|
|
@orgs = @user.organizations.where("name like ?", search).select{|org| OrgSubfield.where("organization_id = #{org.id} and field_type='Resource'").count > 0}
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
if params[:send_type].present? and params[:send_type] == 'news'
|
|
|
|
|
if params[:send_type].present? and (params[:send_type] == 'news' or params[:send_type] == 'message')
|
|
|
|
|
@orgs = @user.organizations.select{|org| OrgSubfield.where("organization_id = #{org.id} and field_type='Post'").count > 0}
|
|
|
|
|
else
|
|
|
|
|
@orgs = @user.organizations.select{|org| OrgSubfield.where("organization_id = #{org.id} and field_type='Resource'").count > 0}
|
|
|
|
|