Patch #1791 ยป change_issue_categories_name_length_limit_to_40-r1745.patch
| app/models/issue_category.rb (working copy) | ||
|---|---|---|
|
|
||
|
validates_presence_of :name
|
||
|
validates_uniqueness_of :name, :scope => [:project_id]
|
||
|
validates_length_of :name, :maximum => 30
|
||
|
validates_length_of :name, :maximum => 40
|
||
|
|
||
|
alias :destroy_without_reassign :destroy
|
||
|
|
||
| app/views/issue_categories/_form.rhtml (working copy) | ||
|---|---|---|
|
<%= error_messages_for 'category' %>
|
||
|
<div class="box">
|
||
|
<p><%= f.text_field :name, :size => 30, :required => true %></p>
|
||
|
<p><%= f.text_field :name, :size => 40, :required => true %></p>
|
||
|
<p><%= f.select :assigned_to_id, @project.users.collect{|u| [u.name, u.id]}, :include_blank => true %></p>
|
||
|
</div>
|
||
| db/migrate/097_change_issue_categories_name_length_limit.rb (revision 0) | ||
|---|---|---|
|
class ChangeIssueCategoriesNameLengthLimit < ActiveRecord::Migration
|
||
|
def self.up
|
||
|
change_column :issue_categories, :name, :string, :limit => 40
|
||
|
end
|
||
|
|
||
|
def self.down
|
||
|
change_column :issue_categories, :name, :string, :limit => 30
|
||
|
end
|
||
|
end
|
||