This commit is contained in:
huang 2015-06-19 13:59:28 +08:00
commit 87fe066695
2 changed files with 3 additions and 3 deletions

View File

@ -157,7 +157,7 @@ class MemosController < ApplicationController
def update
respond_to do |format|
if( @memo.update_column(:subject, params[:memo][:subject]) &&
if( #@memo.update_column(:subject, params[:memo][:subject]) &&
@memo.update_column(:content, params[:memo][:content]) &&
@memo.update_column(:sticky, params[:memo][:sticky]) &&
@memo.update_column(:lock, params[:memo][:lock]))

View File

@ -21,9 +21,9 @@
<div class="actions">
<p>
<% if @memo.parent.nil? && @memo.children.first.nil? %>
<%= f.text_field :subject, :required => true, :size => 96 ,:readonly => false, :maxlength => 50%>
<%#= f.text_field :subject, :required => true, :size => 96 ,:readonly => false, :maxlength => 50%>
<% else %>
<%= f.text_field :subject, :required => true, :size => 96 ,:readonly => true, :style => "border: 1px solid gray", :maxlength => 50%>
<%#= f.text_field :subject, :required => true, :size => 96 ,:readonly => true, :style => "border: 1px solid gray", :maxlength => 50%>
<% end %>
</p>
<% if User.current.admin?%>