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 def update
respond_to do |format| 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(:content, params[:memo][:content]) &&
@memo.update_column(:sticky, params[:memo][:sticky]) && @memo.update_column(:sticky, params[:memo][:sticky]) &&
@memo.update_column(:lock, params[:memo][:lock])) @memo.update_column(:lock, params[:memo][:lock]))

View File

@ -21,9 +21,9 @@
<div class="actions"> <div class="actions">
<p> <p>
<% if @memo.parent.nil? && @memo.children.first.nil? %> <% 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 %> <% 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 %> <% end %>
</p> </p>
<% if User.current.admin?%> <% if User.current.admin?%>