From ab430a13b5ae11437ef2b47e0e208a77def1ccd0 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 13 May 2011 03:51:43 +0000 Subject: [PATCH] scm: switch to save repository setting params in "extra_" or not (#8365, #7047). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5769 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/repositories_controller.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index d580c28e6..f53c3d1d6 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -41,7 +41,17 @@ class RepositoriesController < ApplicationController @repository.project = @project if @repository end if request.post? && @repository - @repository.attributes = params[:repository] + p1 = params[:repository] + p = {} + p_extra = {} + p1.each do |k, v| + if k =~ /^extra_/ + p_extra[k] = v + else + p[k] = v + end + end + @repository.attributes = p @repository.save end render(:update) do |page| -- 2.39.5