2010-06-08 00:45:49 +00:00
|
|
|
class Project
|
2010-07-31 02:15:24 +00:00
|
|
|
|
2010-06-08 00:45:49 +00:00
|
|
|
include Mongoid::Document
|
|
|
|
include CustomFields::ProxyClassEnabler
|
|
|
|
include CustomFields::CustomFieldsFor
|
2010-07-31 02:15:24 +00:00
|
|
|
|
2010-06-08 00:45:49 +00:00
|
|
|
field :name
|
|
|
|
field :description
|
2010-07-31 02:15:24 +00:00
|
|
|
|
|
|
|
references_many :people
|
2010-06-08 00:45:49 +00:00
|
|
|
embeds_many :tasks
|
2010-07-31 02:15:24 +00:00
|
|
|
|
2010-06-08 00:45:49 +00:00
|
|
|
custom_fields_for :people
|
|
|
|
custom_fields_for :tasks
|
2010-07-31 02:15:24 +00:00
|
|
|
|
2010-06-16 14:43:29 +00:00
|
|
|
named_scope :ordered, :order_by => [[:name, :asc]]
|
2010-07-31 02:15:24 +00:00
|
|
|
|
2010-06-08 00:45:49 +00:00
|
|
|
end
|