更改:项目标记不能清空
This commit is contained in:
parent
6eea21821f
commit
71bf2137ac
|
@ -132,7 +132,7 @@ class ProjectsController < ApplicationController
|
|||
# TODO:
|
||||
# 临时特殊处理修改website、lesson_url操作方法
|
||||
if project_params.has_key?("website")
|
||||
if params[:project_topic_names].present? && params[:project_topic_names].is_a?(Array)
|
||||
if params[:project_topic_names].is_a?(Array)
|
||||
ProjectTopicRalate.where(project: @project).destroy_all
|
||||
params[:project_topic_names].each do |name|
|
||||
project_topic = ProjectTopic.find_or_create_by!(name: name.downcase)
|
||||
|
|
Loading…
Reference in New Issue