scinote-web/app/models/result_table.rb

11 lines
300 B
Ruby
Raw Normal View History

2017-06-23 21:19:08 +08:00
class ResultTable < ApplicationRecord
2016-02-12 23:52:43 +08:00
validates :result, :table, presence: true
2018-11-30 01:07:31 +08:00
belongs_to :result, inverse_of: :result_table, optional: true
2017-06-28 21:21:32 +08:00
belongs_to :table,
inverse_of: :result_table,
dependent: :destroy,
touch: true,
2017-06-28 21:21:32 +08:00
optional: true
2016-02-12 23:52:43 +08:00
end