lib/rflow/configuration/port.rb in rflow-0.0.5 vs lib/rflow/configuration/port.rb in rflow-1.0.0a1
- old
+ new
@@ -4,11 +4,11 @@
class RFlow
class Configuration
class Port < ConfigDB
include UUIDKeyed
include ActiveModel::Validations
-
+
class PortInvalid < StandardError; end
belongs_to :component, :primary_key => 'uuid', :foreign_key => 'component_uuid'
# TODO: Make some sort of component/port validation work here
@@ -16,15 +16,14 @@
end
# STI-based classes
class InputPort < Port;
has_many :input_connections, :class_name => 'RFlow::Configuration::Connection', :primary_key => 'uuid', :foreign_key => 'input_port_uuid'
- has_many :output_ports, :through => :connections
+ has_many :connections, :class_name => 'RFlow::Configuration::Connection', :primary_key => 'uuid', :foreign_key => 'input_port_uuid'
end
class OutputPort < Port;
has_many :output_connections, :class_name => 'RFlow::Configuration::Connection', :primary_key => 'uuid', :foreign_key => 'output_port_uuid'
- has_many :input_ports, :through => :connections
+ has_many :connections, :class_name => 'RFlow::Configuration::Connection', :primary_key => 'uuid', :foreign_key => 'output_port_uuid'
end
end
end
-