summaryrefslogtreecommitdiffstats
path: root/app/models/tracker.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2019-03-15 10:38:56 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2019-03-15 10:38:56 +0000
commit84f322b2af0e2a781a1fcc3ae4dd1e6845b22b66 (patch)
tree87a00a7afb6748ecc62d02e61b5b9bdba73269a3 /app/models/tracker.rb
parent3b59c6dfb200bc5d5434cdc1f5a71478747297d9 (diff)
downloadredmine-84f322b2af0e2a781a1fcc3ae4dd1e6845b22b66.tar.gz
redmine-84f322b2af0e2a781a1fcc3ae4dd1e6845b22b66.zip
Add a description for trackers (#442).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@17970 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/tracker.rb')
-rw-r--r--app/models/tracker.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/tracker.rb b/app/models/tracker.rb
index 81fea01ba..3565294a3 100644
--- a/app/models/tracker.rb
+++ b/app/models/tracker.rb
@@ -38,6 +38,7 @@ class Tracker < ActiveRecord::Base
validates_presence_of :name
validates_uniqueness_of :name
validates_length_of :name, :maximum => 30
+ validates_length_of :description, :maximum => 255
scope :sorted, lambda { order(:position) }
scope :named, lambda {|arg| where("LOWER(#{table_name}.name) = LOWER(?)", arg.to_s.strip)}
@@ -71,7 +72,8 @@ class Tracker < ActiveRecord::Base
'core_fields',
'position',
'custom_field_ids',
- 'project_ids'
+ 'project_ids',
+ 'description'
def to_s; name end