From 30ae933e2725170ad073618c2d8e8944aa10c929 Mon Sep 17 00:00:00 2001 From: z9hang Date: Wed, 8 Oct 2014 15:36:58 +0800 Subject: [PATCH] =?UTF-8?q?#1326=20=E7=BC=96=E8=BE=91=E5=B8=96=E5=AD=90?= =?UTF-8?q?=E5=8D=B4=E4=B8=8D=E8=83=BD=E7=BC=96=E8=BE=91=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E7=9A=84=E9=99=84=E4=BB=B6=20=E8=A7=A3=E5=86=B3=EF=BC=9A?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=BC=96=E8=BE=91=E4=B8=8A=E4=BC=A0=E7=9A=84?= =?UTF-8?q?=E9=99=84=E4=BB=B6=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/memos_controller.rb | 1 + app/views/memos/edit.html.erb | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/app/controllers/memos_controller.rb b/app/controllers/memos_controller.rb index 9f261c78a..b980331df 100644 --- a/app/controllers/memos_controller.rb +++ b/app/controllers/memos_controller.rb @@ -148,6 +148,7 @@ class MemosController < ApplicationController @memo.update_column(:sticky, params[:memo][:sticky]) && @memo.update_column(:lock, params[:memo][:lock])) @memo.save_attachments(params[:attachments] || (params[:memo] && params[:memo][:uploads])) + @memo.save # @memo.root.update_attribute(:updated_at, @memo.updated_at) format.html {redirect_to back_memo_url, notice: "#{l :label_memo_create_succ}"} else diff --git a/app/views/memos/edit.html.erb b/app/views/memos/edit.html.erb index 04d95ae86..2e606a94d 100644 --- a/app/views/memos/edit.html.erb +++ b/app/views/memos/edit.html.erb @@ -26,6 +26,10 @@

<%= f.text_area :content, :required => true, :size => 80, id: 'editor01' %>

+

+ <%= l(:label_attachment_plural) %>
+ <%= render :partial => 'attachments/form', :locals => {:container => @memo} %> +


<%= f.submit :value => l(:button_change) %>  <%= link_to l(:button_back), back_url ,:class => "button-canel",:style => "color: #ffffff;"%>