search for: related_nod

Displaying 1 result from an estimated 1 matches for "related_nod".

Did you mean: related_node
2006 Mar 15
3
Self-referential join model does not work
...d::Migration def self.up create_table :nodes do |t| t.column :title, :string, :null => false t.column :body, :text, :null => false, :default => '''' end create_table :edges do |t| t.column :node_id, :integer, :null => false t.column :related_node_id, :integer, :null => false t.column :label, :string, :null => false, :default => '''' end add_index :edges, [:node_id, :related_node_id], :unique => true end def self.down drop_table :edges drop_table :nodes end end The two models are as f...