Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

self referencing association in ruby on rails


has_many :users, class_name: 'User'
belongs_to :manager, class_name: 'User', optional: true
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #referencing #association #ruby #rails
ADD COMMENT
Topic
Name
8+3 =