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