From 945001cb37ec74edf52980e4a34ae96dcfb82b69 Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Sat, 17 Aug 2019 10:42:47 +0800 Subject: [PATCH] =?UTF-8?q?attachment.json.jbuilder=E7=9A=84=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/attachments/_attachment.json.jbuilder | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/views/attachments/_attachment.json.jbuilder b/app/views/attachments/_attachment.json.jbuilder index 01a7f4163..b87154157 100644 --- a/app/views/attachments/_attachment.json.jbuilder +++ b/app/views/attachments/_attachment.json.jbuilder @@ -1,7 +1,8 @@ json.id attachment.id json.title attachment.title json.is_public attachment.publiced? -json.is_lock attachment.locked?(@is_member) +# json.is_lock attachment.locked?(@is_member) +json.is_lock !attachment.publiced? json.is_publish attachment.published? json.publish_time attachment.publish_time json.unified_setting attachment.unified_setting @@ -10,4 +11,6 @@ json.quotes attachment.quotes_count json.description attachment.description json.downloads_count attachment.downloads_count json.created_on attachment.created_on -json.url download_url(attachment) unless attachment.locked?(@is_member) +json.url download_url(attachment) + +# json.url download_url(attachment) unless attachment.locked?(@is_member)