1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-03-14 13:08:14 +00:00
redmine/scm/app/models/repository.rb
Jean-Philippe Lang 9db7b56f4d initial commit of scm support:
* svn browsing
* diff viewing

git-svn-id: http://redmine.rubyforge.org/svn/branches/work@102 e93f8b46-1217-0410-a6f0-8f06a7374b81
2006-12-23 16:13:40 +00:00

12 lines
231 B
Ruby

class Repository < ActiveRecord::Base
belongs_to :project
validates_presence_of :url
validates_format_of :url, :with => /^(http|https|svn):\/\/.+/i
@scm = nil
def scm
@scm ||= SvnRepos::Base.new url
end
end