2016-09-24 03:00:46 +00:00
|
|
|
# frozen_string_literal: true
|
2017-11-06 16:15:18 +00:00
|
|
|
|
2012-09-23 02:39:12 +00:00
|
|
|
module UsersHelper
|
2015-11-06 09:08:42 +00:00
|
|
|
# build custom json autocomplete for typeahead
|
2014-01-29 03:46:58 +00:00
|
|
|
def autocomplete_user_array_json(users)
|
2015-11-06 09:08:42 +00:00
|
|
|
json_users = []
|
|
|
|
users.each do |user|
|
2016-07-26 00:14:23 +00:00
|
|
|
json_users.push user.as_json_for_autocomplete
|
2014-01-29 03:46:58 +00:00
|
|
|
end
|
2015-11-28 14:07:57 +00:00
|
|
|
json_users
|
2014-01-29 03:46:58 +00:00
|
|
|
end
|
2012-09-23 02:39:12 +00:00
|
|
|
end
|