From 29c8a654e253a211bf8010ed2866d315bec62a0e Mon Sep 17 00:00:00 2001
From: p31729568
Date: Wed, 17 Jul 2019 17:28:15 +0800
Subject: [PATCH] fix
---
app/views/libraries/index.html.erb | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/app/views/libraries/index.html.erb b/app/views/libraries/index.html.erb
index 08495304..087ae03c 100644
--- a/app/views/libraries/index.html.erb
+++ b/app/views/libraries/index.html.erb
@@ -6,16 +6,14 @@
<%= link_to '发布案例', new_library_path, class: 'white-btn edu-filter-btn-blue fr mr10 mt8', style: 'color: #4CACFF' %>
- <% if User.current.logged? %>
+ <% if User.current.try(:logged?) %>
-
<%= link_to '全部', libraries_path(search: params[:search]), remote: true %>
- <% if User.current.logged? %>
- -
- <%= link_to '我的', libraries_path(search: params[:search], type: 'mine'), remote: true %>
-
- <% end %>
+ -
+ <%= link_to '我的', libraries_path(search: params[:search], type: 'mine'), remote: true %>
+
<% end %>