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:
parent
9888f13eb0
commit
4ee79a60ef
|
@ -73,6 +73,13 @@ class Repository < ActiveRecord::Base
|
||||||
self.class.scm_name
|
self.class.scm_name
|
||||||
end
|
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?
|
def supports_cat?
|
||||||
scm.supports_cat?
|
scm.supports_cat?
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue