用户最新列表单位完成,修改了点击最后两页报错的问题
This commit is contained in:
parent
df4ad9f597
commit
4da8a3828f
|
@ -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 %>
|
||||||
|
|
Loading…
Reference in New Issue