From fcf34b5918152f4dcd99dbfa3ff01b8e502778e1 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 24 Sep 2015 16:38:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A1=B9=E7=9B=AE=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E4=B8=AD=E2=80=9C=E7=A7=81=E6=9C=89=E2=80=9D=20?= =?UTF-8?q?=E2=80=9C=E5=85=AC=E5=BC=80=E2=80=9D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/projects_controller.rb | 1 + app/models/message.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 414ef6d70..251c47d4c 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -189,6 +189,7 @@ class ProjectsController < ApplicationController @project.organization_id = params[:organization_id] @project.user_id = User.current.id @project.project_new_type = params[:project_new_type] + params[:project][:is_public] ? @project.is_public = 1 : @project.is_public = 0 if validate_parent_id && @project.save @project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id') # Add current user as a project member if he is not admin diff --git a/app/models/message.rb b/app/models/message.rb index 37129885f..2c46857f8 100644 --- a/app/models/message.rb +++ b/app/models/message.rb @@ -86,7 +86,7 @@ class Message < ActiveRecord::Base } - safe_attributes 'subject', 'content' + safe_attributes 'subject', 'content', 'reply_id' safe_attributes 'board_id','locked', 'sticky', :if => lambda {|message, user| if message.project