Project

General

Profile

« Previous | Next » 

Revision 1457

Change projects homepage limit to 255 chars (#663, #1095).

View differences:

trunk/app/models/project.rb
57 57
  validates_associated :custom_values, :on => :update
58 58
  validates_associated :repository, :wiki
59 59
  validates_length_of :name, :maximum => 30
60
  validates_length_of :homepage, :maximum => 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\-]*$/
63 63
  
trunk/app/views/projects/_form.rhtml
13 13
<% unless @project.identifier_frozen? %>
14 14
<br /><em><%= l(:text_length_between, 3, 20) %> <%= l(:text_project_identifier_info) %></em>
15 15
<% end %></p>
16
<p><%= f.text_field :homepage, :size => 40 %></p>
16
<p><%= f.text_field :homepage, :size => 60 %></p>
17 17
<p><%= f.check_box :is_public %></p>
18 18
<%= wikitoolbar_for 'project_description' %>
19 19

  
trunk/db/migrate/094_change_projects_homepage_limit.rb
1
class ChangeProjectsHomepageLimit < ActiveRecord::Migration
2
  def self.up
3
    change_column :projects, :homepage, :string, :limit => nil, :default => ''
4
  end
5

  
6
  def self.down
7
    change_column :projects, :homepage, :string, :limit => 60, :default => ''
8
  end
9
end
0 10

  

Also available in: Unified diff