summaryrefslogtreecommitdiffstats
path: root/app/models/change.rb
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2010-07-06 21:06:09 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2010-07-06 21:06:09 +0000
commit0d5fca9ba5ac81db46211b6cc06686e59c57beb4 (patch)
tree650b65b3305185ccbf7a872e7a1dd9cc51b07233 /app/models/change.rb
parentad73f12a6b24ae4c835187f787672345e636a21e (diff)
downloadredmine-0d5fca9ba5ac81db46211b6cc06686e59c57beb4.tar.gz
redmine-0d5fca9ba5ac81db46211b6cc06686e59c57beb4.zip
Force the default value of path to be set on the Change model class. #5771
This is needed because MySQL does not support default values on text columns (Error introduced in r3828) Contributed by Holger Just git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3830 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/change.rb')
-rw-r--r--app/models/change.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/change.rb b/app/models/change.rb
index 385fe5acb..e5c1585b4 100644
--- a/app/models/change.rb
+++ b/app/models/change.rb
@@ -23,4 +23,8 @@ class Change < ActiveRecord::Base
def relative_path
changeset.repository.relative_path(path)
end
+
+ def before_save
+ path ||= ""
+ end
end