merge usefull pull requests

merge pull requests to have both features:
1 - search using activerecord scope.
2 - Trigger change on data-id-element and data-update-elements when user autocompletes an item.