Sha256: 8a54de885dba93fcbb3d3bd9ea7379ba6b22ab6ef73b2011c72d863f115e65db

Contents?: true

Size: 700 Bytes

Versions: 2

Compression:

Stored size: 700 Bytes

Contents

# frozen_string_literal: true

# == Schema Information
#
# Table name: edges
#
#  id               :integer          not null, primary key
#  comment          :string           default("")
#  cost             :integer          default(0)
#  directed         :boolean          default(TRUE)
#  destination_type :string
#  destination_id   :integer
#  departure_type   :string
#  departure_id     :integer
#  created_at       :datetime
#  updated_at       :datetime
#
class Edge < ActiveRecord::Base
  extend ActsAsGraphDiagram::Node
  include ActsAsGraphDiagram::EdgeScopes

  belongs_to :destination, polymorphic: true, optional: true
  belongs_to :departure,   polymorphic: true, optional: true
end

Version data entries

2 entries across 1 versions & 1 rubygems

Version Path
acts_as_graph_diagram-0.1.0 lib/generators/templates/model.rb
acts_as_graph_diagram-0.1.0 test/dummy/app/models/edge.rb