Typeahead roles

Adds roles to the typeahead dropdown.

Looks like this:

![screen shot 2014-10-01 at 9 59 20 am](https://cloud.githubusercontent.com/assets/1903518/4476139/2bb04f8c-4973-11e4-944b-da5a988d916c.png)

- shows collaborators on top, but shows duplicates. We are planning on fixing that issue with the migration to select2

Example:

![screen shot 2014-10-01 at 10 00 20 am](https://cloud.githubusercontent.com/assets/1903518/4476153/4e1a06ee-4973-11e4-8005-19f02ee8e799.png)



Yeah I was gonna save that refactor for select2 since it's not a huge deal at this point.

On Tue, Oct 7, 2014 at 10:40 AM, Chris Westra <notifications@github.com>
wrote:

>> @@ -0,0 +1,17 @@
>> +class FilteredUsersController < ApplicationController
>> +  before_action :authenticate_user!
>> +  respond_to :json
>> +
>> +  def collaborators
>> +    users = UserSearch.collaborators(params[:paper_id])
>> +    respond_with users, each_serializer: FilteredUsersSerializer, paper_id: params[:paper_id], root: false
> Aaand I was thinking of a different spot in the code.  Aaron is saying that the typeahead thing expects a different payload format than the standard ember data one.  
> If they were serializing everything by default [the docs](https://github.com/rails-api/active_model_serializers/tree/0-8-stable#arrays) say they'd get something like `{users: []}` and their component must expect just `[]`.  Maybe it'd be better to change the component like he mentioned. 
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/Tahi-project/tahi/pull/458/files#r18523275