scinote-web/app/models/connection.rb

13 lines
355 B
Ruby
Raw Normal View History

2017-06-23 21:19:08 +08:00
class Connection < ApplicationRecord
2017-06-28 21:21:32 +08:00
belongs_to :to,
class_name: 'MyModule',
foreign_key: 'input_id',
inverse_of: :inputs,
optional: true
belongs_to :from,
class_name: 'MyModule',
foreign_key: 'output_id',
inverse_of: :outputs,
optional: true
2016-02-12 23:52:43 +08:00
end