metamaps--metamaps/app/helpers/users_helper.rb

12 lines
270 B
Ruby
Raw Normal View History

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