noosfero | Custom roles management (#514)

Rodrigo Souto gitlab at gitlab.com
Wed May 6 18:54:07 BRT 2015


New comment for Merge Request 514

https://gitlab.com/noosfero/noosfero/merge_requests/514#note_1198641


Rodrigo Souto

Using the LIKE query search like that is not recommended anymore (although there are some places where it's still used). Instead you should use the search method ApplicationController#find_by_contents that takes into account the search engine you are using and the fields of each model that should be considered on a full_text search. In this case it'd be something like: `result = find_by_contents(:people, environment, profile.members, params[:q])[:results]`


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20150506/6c49cbb0/attachment-0001.html>


More information about the Noosfero-dev mailing list