Class: Change

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/change.rb

Overview

– copyright ChiliProject is a project management system.

Copyright (C) 2010-2013 the ChiliProject Team

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

See doc/COPYRIGHT.rdoc for more details. ++

Instance Method Summary collapse

Instance Method Details

#from_pathObject


32
33
34
35
# File 'app/models/change.rb', line 32

def from_path
  # TODO: shouldn't access Changeset#to_utf8 directly
  self.from_path = Changeset.to_utf8(read_attribute(:from_path), changeset_repository_encoding)
end

#init_pathObject


37
38
39
# File 'app/models/change.rb', line 37

def init_path
  self.path ||= ""
end

#pathObject


27
28
29
30
# File 'app/models/change.rb', line 27

def path
  # TODO: shouldn't access Changeset#to_utf8 directly
  self.path = Changeset.to_utf8(read_attribute(:path), changeset_repository_encoding)
end

#relative_pathObject


23
24
25
# File 'app/models/change.rb', line 23

def relative_path
  changeset.repository.relative_path(path)
end