mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-31 05:05:18 +01:00
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@131 a4c988fc-2ded-0310-b66e-134b36920a42
15 lines
276 B
Ruby
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
|