mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-31 04:32:06 +08:00
11 lines
291 B
Ruby
11 lines
291 B
Ruby
class StepAsset < ApplicationRecord
|
|
validates :step, :asset, presence: true
|
|
|
|
belongs_to :step,
|
|
inverse_of: :step_assets,
|
|
optional: true
|
|
belongs_to :asset,
|
|
inverse_of: :step_asset,
|
|
dependent: :destroy,
|
|
optional: true
|
|
end
|