86 lines
2.0 KiB
Ruby
86 lines
2.0 KiB
Ruby
object @teacher
|
|
|
|
attributes :id,
|
|
:biography,
|
|
:created_at,
|
|
:id,
|
|
:introductory_video,
|
|
:lesson_duration_120,
|
|
:lesson_duration_30,
|
|
:lesson_duration_45,
|
|
:lesson_duration_60,
|
|
:lesson_duration_90,
|
|
:price_duration_120_cents,
|
|
:price_duration_30_cents,
|
|
:price_duration_45_cents,
|
|
:price_duration_60_cents,
|
|
:price_duration_90_cents,
|
|
:price_per_lesson_cents,
|
|
:price_per_month_cents,
|
|
:prices_per_lesson,
|
|
:prices_per_month,
|
|
:teaches_advanced,
|
|
:teaches_age_lower,
|
|
:teaches_age_upper,
|
|
:teaches_beginner,
|
|
:teaches_intermediate,
|
|
:updated_at,
|
|
:user_id,
|
|
:website,
|
|
:years_playing,
|
|
:years_teaching,
|
|
:errors
|
|
|
|
|
|
node :instruments do
|
|
@teacher.instruments.collect{|o|o.id}
|
|
end
|
|
|
|
node :subjects do
|
|
@teacher.subjects.collect{|o|o.id}
|
|
end
|
|
|
|
node :genres do
|
|
@teacher.genres.collect{|o|o.id}
|
|
end
|
|
|
|
node :languages do
|
|
@teacher.languages.collect{|o|o.id}
|
|
end
|
|
|
|
node :experiences_teaching do
|
|
@teacher.experiences_teaching.collect do |o|
|
|
{
|
|
name: o.name,
|
|
experience_type: o.experience_type,
|
|
organization: o.organization,
|
|
start_year: o.start_year,
|
|
end_year: o.end_year
|
|
}
|
|
end # collect
|
|
end
|
|
|
|
node :experiences_education do
|
|
@teacher.experiences_education.collect do |o|
|
|
{
|
|
name: o.name,
|
|
experience_type: o.experience_type,
|
|
organization: o.organization,
|
|
start_year: o.start_year,
|
|
end_year: o.end_year
|
|
}
|
|
end # collect
|
|
end
|
|
|
|
node :experiences_award do
|
|
@teacher.experiences_award.collect do |o|
|
|
{
|
|
name: o.name,
|
|
experience_type: o.experience_type,
|
|
organization: o.organization,
|
|
start_year: o.start_year,
|
|
end_year: o.end_year
|
|
}
|
|
end # collect
|
|
end
|