Patch #1789 ยป change_project_name_length_limit_to_35-r1745.patch
app/models/project.rb (working copy) | ||
---|---|---|
56 | 56 |
validates_presence_of :name, :identifier |
57 | 57 |
validates_uniqueness_of :name, :identifier |
58 | 58 |
validates_associated :repository, :wiki |
59 |
validates_length_of :name, :maximum => 30
|
|
59 |
validates_length_of :name, :maximum => 35
|
|
60 | 60 |
validates_length_of :homepage, :maximum => 255 |
61 | 61 |
validates_length_of :identifier, :in => 3..20 |
62 | 62 |
validates_format_of :identifier, :with => /^[a-z0-9\-]*$/ |
app/views/projects/_form.rhtml (working copy) | ||
---|---|---|
2 | 2 | |
3 | 3 |
<div class="box"> |
4 | 4 |
<!--[form:project]--> |
5 |
<p><%= f.text_field :name, :required => true %><br /><em><%= l(:text_caracters_maximum, 30) %></em></p>
|
|
5 |
<p><%= f.text_field :name, :required => true %><br /><em><%= l(:text_caracters_maximum, 35) %></em></p>
|
|
6 | 6 | |
7 | 7 |
<% if User.current.admin? and !@root_projects.empty? %> |
8 | 8 |
<p><%= f.select :parent_id, (@root_projects.collect {|p| [p.name, p.id]}), { :include_blank => true } %></p> |
db/migrate/096_change_project_name_length_limit.rb (revision 0) | ||
---|---|---|
1 |
class ChangeProjectNameLengthLimit < ActiveRecord::Migration |
|
2 |
def self.up |
|
3 |
change_column :projects, :name, :string, :limit => 35 |
|
4 |
end |
|
5 |
|
|
6 |
def self.down |
|
7 |
change_column :projects, :name, :string, :limit => 30 |
|
8 |
end |
|
9 |
end |