用户最新列表单位完成,修改了点击最后两页报错的问题
This commit is contained in:
parent
df4ad9f597
commit
4da8a3828f
|
@ -92,13 +92,15 @@
|
|||
<% end%>
|
||||
</td>
|
||||
<td align="center">
|
||||
<% if user.user_extensions.identity.to_i == 0 %>
|
||||
<% unless user.user_extensions.nil? %>
|
||||
<% if user.user_extensions.identity.to_i == 0 %>
|
||||
<!--优先取school中校名,如果校名不存在就取occupation-->
|
||||
<% occupation = user.user_extensions.school_id.nil? ? "" : (School.where("id =?", user.user_extensions.school_id)).first.try(:name) %>
|
||||
<%= occupation.blank? ? user.user_extensions.occupation : occupation %>
|
||||
<% else %>
|
||||
<%= user.user_extensions.occupation %>
|
||||
<% end %>
|
||||
<% occupation = user.user_extensions.school_id.nil? ? "" : (School.where("id =?", user.user_extensions.school_id)).first.try(:name) %>
|
||||
<%= occupation.blank? ? user.user_extensions.occupation : occupation %>
|
||||
<% else %>
|
||||
<%= user.user_extensions.occupation %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue