Application_Form/app/models/seminar_session.rb

14 lines
283 B
Ruby
Raw Normal View History

# encoding: utf-8
class SeminarSession
include Mongoid::Document
include Mongoid::Timestamps
field :key
belongs_to :seminar_main
field :seminar_signup_ids, :type => Array, :default => []
def seminar_signups
SeminarSignup.where(:id.in=>seminar_signup_ids)
end
end