Class: Gaku::GradingMethodSet

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/gaku/grading_method_set.rb

Instance Method Summary collapse

Instance Method Details

#itemsObject



16
17
18
# File 'app/models/gaku/grading_method_set.rb', line 16

def items
  grading_method_set_items
end

#make_primaryObject



11
12
13
14
# File 'app/models/gaku/grading_method_set.rb', line 11

def make_primary
  GradingMethodSet.where.not(id: id).update_all({ primary: false })
  update_attribute(:primary, true)
end