2015-07-27 15:02:37 +00:00
|
|
|
module JamRuby
|
|
|
|
|
class TeacherExperience < ActiveRecord::Base
|
|
|
|
|
include HtmlSanitize
|
|
|
|
|
html_sanitize strict: [:name, :organization]
|
|
|
|
|
belongs_to :teacher, :class_name => "JamRuby::Teacher"
|
2015-08-31 16:32:20 +00:00
|
|
|
attr_accessible :name, :experience_type, :organization, :start_year, :end_year
|
|
|
|
|
|
2016-07-17 15:16:27 +00:00
|
|
|
scope :teaching, -> { where(experience_type: 'teaching')}
|
|
|
|
|
scope :education, -> { where(experience_type: 'education') }
|
|
|
|
|
scope :awards, -> { where(experience_type: 'award') }
|
2015-07-27 15:02:37 +00:00
|
|
|
end
|
|
|
|
|
end
|