From: Toshi MARUYAMA Date: Fri, 13 May 2011 03:51:43 +0000 (+0000) Subject: scm: switch to save repository setting params in "extra_" or not (#8365, #7047). X-Git-Tag: 1.2.0~124 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ab430a13b5ae11437ef2b47e0e208a77def1ccd0;p=redmine.git 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 --- 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|