Sha256: e72a04ec3f38bf712287c2685618145af39719cf096d116a3063522ebb6c3697

Contents?: true

Size: 367 Bytes

Versions: 220

Compression:

Stored size: 367 Bytes

Contents

# This class models a vertex in a directed graph.
class Vertex < ActiveRecord::Base
  has_many :sink_edges, :class_name => 'Edge', :foreign_key => 'source_id'
  has_many :sinks, :through => :sink_edges

  has_and_belongs_to_many :sources,
    :class_name => 'Vertex', :join_table => 'edges',
    :foreign_key => 'sink_id', :association_foreign_key => 'source_id'
end

Version data entries

220 entries across 217 versions & 30 rubygems

Version Path
gemstreamer-1.1.0 spec/assets/testapp/vendor/rails/activerecord/test/models/vertex.rb
gemstreamer-1.0.0 spec/assets/testapp/vendor/rails/activerecord/test/models/vertex.rb
gemstreamer-0.0.0 spec/assets/testapp/vendor/rails/activerecord/test/models/vertex.rb
radiant-rc-0.9.0 vendor/rails/activerecord/test/models/vertex.rb
activerecord-2.2.3 test/models/vertex.rb
webroar-0.2.2 src/admin_panel/vendor/rails/activerecord/test/models/vertex.rb
radiant-0.8.1 vendor/rails/activerecord/test/models/vertex.rb
activerecord-2.3.4 test/models/vertex.rb
activerecord-2.3.3 test/models/vertex.rb
activerecord-1.15.4 test/fixtures/vertex.rb
activerecord-1.15.3 test/fixtures/vertex.rb
activerecord-1.15.6 test/fixtures/vertex.rb
activerecord-1.15.5 test/fixtures/vertex.rb
activerecord-2.0.0 test/fixtures/vertex.rb
activerecord-2.0.2 test/fixtures/vertex.rb
activerecord-2.0.1 test/fixtures/vertex.rb
activerecord-2.0.5 test/fixtures/vertex.rb
activerecord-2.0.4 test/fixtures/vertex.rb
activerecord-2.2.2 test/models/vertex.rb
activerecord-2.1.2 test/models/vertex.rb