You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
416 B
14 lines
416 B
class EcCourseSupport < ApplicationRecord
|
|
default_scope { order(position: :asc) }
|
|
|
|
alias_attribute :weights, :weigths
|
|
|
|
belongs_to :ec_course
|
|
belongs_to :ec_graduation_subitem
|
|
|
|
has_one :ec_graduation_requirement_calculation, dependent: :destroy
|
|
|
|
validates :weights, presence: true, numericality: { greater_than_or_equal_to: 0, less_than_or_equal_to: 1 }
|
|
|
|
number_display_methods :weights
|
|
end |