scinote-web/app/models/step_asset.rb

7 lines
195 B
Ruby
Raw Normal View History

2016-02-12 23:52:43 +08:00
class StepAsset < ActiveRecord::Base
validates :step, :asset, presence: true
belongs_to :step, inverse_of: :step_assets
2016-08-18 02:49:20 +08:00
belongs_to :asset, inverse_of: :step_asset, dependent: :destroy
2016-02-12 23:52:43 +08:00
end