app/models/studentdb/student_record.rb
# Since +class+ is a reserved word, that column does not automatically become an instance method. This method creates an easy
# way to reference the +class+ attribute without causing all sorts of hell with ActiveRecord.
# 
# If a Quarter object is passed, this method examines the student's transcript to determine the class_standing of the
# student during that quarter rather than the current class code stored in student_1_v. Returns nil if the student was
# not a registered student for that quarter, unless the quarter is a summer quarter -- we'll reference Spring quarter in
# that case).
Since +class+ is a reserved word, that column does not automatically become an instance method. This method creates an easy
way to reference the +class+ attribute without causing all sorts of hell with ActiveRecord.

If a Quarter object is passed, this method examines the student's transcript to determine the class_standing of the
student during that quarter rather than the current class code stored in student_1_v. Returns nil if the student was
not a registered student for that quarter, unless the quarter is a summer quarter -- we'll reference Spring quarter in
that case).
Since + class + is a reserved word that column does not automatically become an instance method . This method creates an easy way to reference the + class + attribute without causing all sorts of hell with ActiveRecord . If a Quarter object is passed this method examines the student ' s transcript to determine the class_standing of the student during that quarter rather than the current class code stored in student_1_v . Returns nil if the student was not a registered student for that quarter unless the quarter is a summer quarter -- we ' ll reference Spring quarter in that case ) .
def class_standing(quarter = nil)
    if quarter
      t = transcripts.find([system_key, quarter.year, quarter.quarter_code_id]) rescue nil
      t = (transcripts.find([system_key, quarter.prev.year, quarter.prev.quarter_code_id]) rescue nil) if t.nil?
      t.nil? ? nil : t.class_standing
    else
      read_attribute(:class)
    end
  end
def class_standing ( quarter = nil ) if quarter t = transcripts . find ( [ system_key , quarter . year , quarter . quarter_code_id ] ) rescue nil t = ( transcripts . find ( [ system_key , quarter . prev . year , quarter . prev . quarter_code_id ] ) rescue nil ) if t . nil? t . nil? ? nil : t . class_standing else read_attribute ( :class ) end end
Since +class+ is a reserved word, that column does not automatically become an instance method.
Since + class + is a reserved word that column does not automatically become an instance method .
quarter