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

13 lines
271 B
Ruby
Raw Permalink Normal View History

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
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