用户最新列表单位完成,修改了点击最后两页报错的问题

This commit is contained in:
linchun 2016-03-15 09:47:27 +08:00
parent df4ad9f597
commit 4da8a3828f
1 changed files with 8 additions and 6 deletions

View File

@ -92,6 +92,7 @@
<% end%> <% end%>
</td> </td>
<td align="center"> <td align="center">
<% unless user.user_extensions.nil? %>
<% if user.user_extensions.identity.to_i == 0 %> <% if user.user_extensions.identity.to_i == 0 %>
<!--优先取school中校名如果校名不存在就取occupation--> <!--优先取school中校名如果校名不存在就取occupation-->
<% occupation = user.user_extensions.school_id.nil? ? "" : (School.where("id =?", user.user_extensions.school_id)).first.try(:name) %> <% occupation = user.user_extensions.school_id.nil? ? "" : (School.where("id =?", user.user_extensions.school_id)).first.try(:name) %>
@ -99,6 +100,7 @@
<% else %> <% else %>
<%= user.user_extensions.occupation %> <%= user.user_extensions.occupation %>
<% end %> <% end %>
<% end %>
</td> </td>
</tr> </tr>
<% end %> <% end %>