From 192c5735cb51a0508da2372043edce89ce8eb3b4 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Wed, 2 Sep 2015 11:46:49 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=B4=E5=90=A7=E5=B8=96=E5=AD=90=E5=B7=B2?= =?UTF-8?q?=E8=AF=BB=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/memos_controller.rb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/controllers/memos_controller.rb b/app/controllers/memos_controller.rb index c78b36666..27e0d472f 100644 --- a/app/controllers/memos_controller.rb +++ b/app/controllers/memos_controller.rb @@ -124,12 +124,11 @@ class MemosController < ApplicationController end end end - else - query_memo_messages = @memo.memo_messages - query_memo_messages.each do |query_memo_message| - if User.current.id == query_memo_message.user_id - query_memo_message.update_attributes(:viewed => true) - end + end + query_memo_messages = @memo.memo_messages + query_memo_messages.each do |query_memo_message| + if User.current.id == query_memo_message.user_id + query_memo_message.update_attributes(:viewed => true) end end