Mercurial > hg > soundsoftware-site
comparison app/models/.svn/text-base/change.rb.svn-base @ 1:cca12e1c1fd4
* Update to Redmine trunk (SVN revisions 3860-3892)
author | Chris Cannam |
---|---|
date | Wed, 28 Jul 2010 12:08:28 +0100 |
parents | 513646585e45 |
children | cbce1fd3b1b7 |
comparison
equal
deleted
inserted
replaced
0:513646585e45 | 1:cca12e1c1fd4 |
---|---|
17 | 17 |
18 class Change < ActiveRecord::Base | 18 class Change < ActiveRecord::Base |
19 belongs_to :changeset | 19 belongs_to :changeset |
20 | 20 |
21 validates_presence_of :changeset_id, :action, :path | 21 validates_presence_of :changeset_id, :action, :path |
22 before_save :init_path | |
22 | 23 |
23 def relative_path | 24 def relative_path |
24 changeset.repository.relative_path(path) | 25 changeset.repository.relative_path(path) |
25 end | 26 end |
26 | 27 |
27 def before_save | 28 def init_path |
28 path ||= "" | 29 self.path ||= "" |
29 end | 30 end |
30 end | 31 end |