From 4ee79a60efa1a4a8dc6ceabc92634ea2269d1095 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 12 May 2011 23:58:38 +0000 Subject: [PATCH] scm: add a repository model method "merge_extra_info()" to merge "extra_info" serializing hash yaml (#7146, #7047). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5766 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/repository.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/models/repository.rb b/app/models/repository.rb index 47471ca92..de2720661 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -73,6 +73,13 @@ class Repository < ActiveRecord::Base self.class.scm_name end + def merge_extra_info(arg) + h = extra_info || {} + return h if arg.nil? + h.merge!(arg) + write_attribute(:extra_info, h) + end + def supports_cat? scm.supports_cat? end -- 2.39.5