diff --git a/app/models/repository.rb b/app/models/repository.rb index 28f2c5a16..29e87584f 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -18,7 +18,7 @@ class Repository < ActiveRecord::Base belongs_to :project validates_presence_of :url - validates_format_of :url, :with => /^(http|https|svn):\/\/.+/i + validates_format_of :url, :with => /^(http|https|svn|file):\/\/.+/i @scm = nil diff --git a/app/views/projects/_form.rhtml b/app/views/projects/_form.rhtml index a6102e012..8c5b9f108 100644 --- a/app/views/projects/_form.rhtml +++ b/app/views/projects/_form.rhtml @@ -30,7 +30,7 @@ <%= hidden_field_tag "repository_enabled", 0 %>
<%= repository.text_field :url, :size => 60, :required => true %>
(http://, https://, svn://)
<%= repository.text_field :url, :size => 60, :required => true %>
(http://, https://, svn://, file:///)