socialforge/app/views/at/show.json.erb

12 lines
493 B
Plaintext
Raw Normal View History

2015-12-14 17:13:57 +08:00
[
<% @users && @users.each_with_index do |person,index| %>
2016-03-11 18:50:37 +08:00
<% if index == 0 %>
{"id":<%=index%>, "userid": "<%=person.id%>", "name": "所有人", "login": "<%=person.name%>", "searchKey": "<%=person.name%>"}
<%= index != @users.size-1 ? ',' : '' %>
<% else %>
2015-12-15 14:52:24 +08:00
{"id":<%=index%>, "userid": <%=person.id%>, "name": "<%=person.show_name%>", "login": "<%=person.login%>", "searchKey": "<%=person.get_at_show_name%>"}
2015-12-14 17:13:57 +08:00
<%= index != @users.size-1 ? ',' : '' %>
<% end %>
2016-03-11 18:50:37 +08:00
<% end %>
2015-12-14 17:13:57 +08:00
]