scinote-web/app/models/connection.rb
2016-02-12 16:52:43 +01:00

5 lines
232 B
Ruby

class Connection < ActiveRecord::Base
belongs_to :to, :class_name => 'MyModule', :foreign_key => 'input_id', inverse_of: :inputs
belongs_to :from, :class_name => 'MyModule', :foreign_key => 'output_id', inverse_of: :outputs
end