summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-08-25 14:41:55 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-08-25 14:41:55 +0000
commitc754e017dcc49b6c3bdd14ad0fe4553a044b3c73 (patch)
treef61881ca88b961c3f116a2d443b32741d009b700 /app
parent138566de0b9bc545ddcdd9492c38c75a61e918f1 (diff)
downloadredmine-c754e017dcc49b6c3bdd14ad0fe4553a044b3c73.tar.gz
redmine-c754e017dcc49b6c3bdd14ad0fe4553a044b3c73.zip
Changeset comments are now stripped before being stored in the database (patch by Nicholas Wieland).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@657 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/models/changeset.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/changeset.rb b/app/models/changeset.rb
index 879896fe4..57e2d74a4 100644
--- a/app/models/changeset.rb
+++ b/app/models/changeset.rb
@@ -25,6 +25,10 @@ class Changeset < ActiveRecord::Base
validates_uniqueness_of :revision, :scope => :repository_id
validates_uniqueness_of :scmid, :scope => :repository_id, :allow_nil => true
+ def comments=(comment)
+ write_attribute(:comments, comment.strip)
+ end
+
def committed_on=(date)
self.commit_date = date
super