tracks/tracks/app/models/note.rb
2005-08-08 01:54:05 +00:00

15 lines
276 B
Ruby

class Note < ActiveRecord::Base
belongs_to :user
belongs_to :project
attr_protected :user
def self.list_all
find(:all, :order => "created_at DESC")
end
def self.list_of(project_id)
find(:all, :conditions => [ "project_id = ?" , project_id ])
end
end