8a17394223
has_many_related => references_many belongs_to_related => referenced_in
18 lines
323 B
Ruby
18 lines
323 B
Ruby
class Project
|
|
|
|
include Mongoid::Document
|
|
include CustomFields::ProxyClassEnabler
|
|
include CustomFields::CustomFieldsFor
|
|
|
|
field :name
|
|
field :description
|
|
|
|
references_many :people
|
|
embeds_many :tasks
|
|
|
|
custom_fields_for :people
|
|
custom_fields_for :tasks
|
|
|
|
named_scope :ordered, :order_by => [[:name, :asc]]
|
|
|
|
end |