Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

rails many to many relationship same model

class PageAssociation < ActiveRecord::Base

  belongs_to :left_page, :class_name => 'Page'
  belongs_to :right_page, :class_name => 'Page'

end
Source by cobwwweb.com #
 
PREVIOUS NEXT
Tagged: #rails #relationship #model
ADD COMMENT
Topic
Name
7+3 =