Class: Parallel

Inherits:
Sequel::Model
  • Object
show all
Defined in:
app/models/parallel.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.for_teacher(teacher_id) ⇒ Object


14
15
16
17
# File 'app/models/parallel.rb', line 14

def self.for_teacher(teacher_id)
  filter(:teacher_ids.pg_array.contains([teacher_id]))  # alternative: filter(teacher_id => :teacher_ids.pg_array.any)

end

Instance Method Details

#to_sObject


19
20
21
# File 'app/models/parallel.rb', line 19

def to_s
  code.to_s
end