最近登录用户列表中无法正确显示单位名称
This commit is contained in:
parent
54c16753cb
commit
686cf8b926
|
@ -92,15 +92,7 @@
|
||||||
<% end%>
|
<% end%>
|
||||||
</td>
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<% unless user.user_extensions.nil? %>
|
<%= user.user_extensions.school_id.nil? ? "" : (School.find user.user_extensions.school_id).try(:name) %>
|
||||||
<% 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 %>
|
|
||||||
<% end %>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Loading…
Reference in New Issue