2009-02-25 09:22:11 +01:00
|
|
|
require File.join(FIXTURE_PATH, 'more', 'question')
|
|
|
|
require File.join(FIXTURE_PATH, 'more', 'person')
|
|
|
|
|
2010-06-20 22:01:11 +02:00
|
|
|
class Course < CouchRest::Model::Base
|
2009-02-25 09:22:11 +01:00
|
|
|
use_database TEST_SERVER.default_database
|
|
|
|
|
2010-06-20 22:01:11 +02:00
|
|
|
property :title, String
|
|
|
|
property :questions, [Question]
|
|
|
|
property :professor, Person
|
|
|
|
property :participants, [Object]
|
|
|
|
property :ends_at, Time
|
|
|
|
property :estimate, Float
|
|
|
|
property :hours, Integer
|
|
|
|
property :profit, BigDecimal
|
|
|
|
property :started_on, :type => Date
|
|
|
|
property :updated_at, :type => DateTime
|
|
|
|
property :active, :type => TrueClass
|
2010-05-21 23:00:19 +02:00
|
|
|
property :very_active, :type => TrueClass
|
2010-06-20 22:01:11 +02:00
|
|
|
property :klass, :type => Class
|
2009-02-25 09:22:11 +01:00
|
|
|
|
|
|
|
view_by :title
|
2010-06-15 01:35:14 +02:00
|
|
|
view_by :title, :active
|
2009-02-25 09:22:11 +01:00
|
|
|
view_by :dept, :ducktype => true
|
2010-06-15 01:35:14 +02:00
|
|
|
|
2010-03-03 03:18:32 +01:00
|
|
|
end
|