app/models/changelog.rb
class Changelog < ActiveRecord::Base
belongs_to :version
attr_accessible :version_id, :text, :version
audited
# Validators
validates :version_id, :presence => true,
:uniqueness => true
validates :text, :presence => true
def version
Version.find(self.version_id)
end
end