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
This commit is contained in:
Toshi MARUYAMA 2011-05-12 23:58:38 +00:00
parent 9888f13eb0
commit 4ee79a60ef
1 changed files with 7 additions and 0 deletions

View File

@ -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