13 lines
478 B
Ruby
13 lines
478 B
Ruby
module JamRuby
|
|
class TeacherExperience < ActiveRecord::Base
|
|
include HtmlSanitize
|
|
html_sanitize strict: [:name, :organization]
|
|
belongs_to :teacher, :class_name => "JamRuby::Teacher"
|
|
attr_accessible :name, :experience_type, :organization, :start_year, :end_year
|
|
|
|
scope :teaching, -> { where(experience_type: 'teaching')}
|
|
scope :education, -> { where(experience_type: 'education') }
|
|
scope :awards, -> { where(experience_type: 'award') }
|
|
end
|
|
end
|