Advertisement
Guest User

Untitled

a guest
Apr 26th, 2016
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rails 0.29 KB | None | 0 0
  1. class Man < ActiveRecord::Base
  2.   has_one :right_shoe, class_name: 'Content', dependent: :destroy
  3.   has_one :left_shoe, class_name: 'Content', dependent: :destroy
  4. end
  5.  
  6. class Shoe < ActiveRecord::Base
  7.   belongs_to :service, ???as: :right_shoe???
  8.   belongs_to :service, ???as: :left_shoe???
  9. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement