scinote-web/app/models/step_table.rb

10 lines
288 B
Ruby
Raw Normal View History

2019-05-09 23:10:02 +08:00
# frozen_string_literal: true
2017-06-23 21:19:08 +08:00
class StepTable < ApplicationRecord
2016-02-12 23:52:43 +08:00
validates :step, :table, presence: true
2019-05-09 23:10:02 +08:00
belongs_to :step, inverse_of: :step_tables, touch: true
belongs_to :table, inverse_of: :step_table
has_one :step_orderable_element, as: :orderable, dependent: :destroy
2016-02-12 23:52:43 +08:00
end