noosfero | Invitation to events (!1445)

Rodrigo Souto gitlab at mg.gitlab.com
Fri May 11 13:40:44 BRT 2018


Rodrigo Souto started a new discussion on app/controllers/my_profile/cms_controller.rb:

>                             .uniq {|c| c[:id] }.to_json
>    end
>  
> +  def search_people_to_invite
> +    profile = Profile.find_by(identifier: params[:profile])
> +    scope = profile.kind_of?(Organization) ? profile.members : profile.friends
> +    results = find_by_contents(:profiles, environment, scope, params['q'], {:page => 1}, {:fields => ['name']})[:results]

I think it's a good idea to find people by identifiers as well. Some people have very specific identifier that are sometimes more relevant than there names. Like @diguliu, for example.  xD

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/noosfero/noosfero/merge_requests/1445#note_72727975
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20180511/54d6597c/attachment-0001.html>


More information about the Noosfero-dev mailing list