@@ -18,7 +18,7 | |||
|
18 | 18 | class Repository < ActiveRecord::Base |
|
19 | 19 | belongs_to :project |
|
20 | 20 | validates_presence_of :url |
|
21 | validates_format_of :url, :with => /^(http|https|svn):\/\/.+/i | |
|
21 | validates_format_of :url, :with => /^(http|https|svn|file):\/\/.+/i | |
|
22 | 22 | |
|
23 | 23 | @scm = nil |
|
24 | 24 |
@@ -30,7 +30,7 | |||
|
30 | 30 | <%= hidden_field_tag "repository_enabled", 0 %> |
|
31 | 31 | <div id="repository"> |
|
32 | 32 | <% fields_for :repository, @project.repository, { :builder => TabularFormBuilder, :lang => current_language} do |repository| %> |
|
33 | <p><%= repository.text_field :url, :size => 60, :required => true %><br />(http://, https://, svn://)</p> | |
|
33 | <p><%= repository.text_field :url, :size => 60, :required => true %><br />(http://, https://, svn://, file:///)</p> | |
|
34 | 34 | <% end %> |
|
35 | 35 | </div> |
|
36 | 36 | <%= javascript_tag "Element.hide('repository');" if @project.repository.nil? %> |
General Comments 0
You need to be logged in to leave comments.
Login now