Guest User

Untitled

a guest
Feb 12th, 2012
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. class Province < ActiveRecord::Base
  2. has_many :buildings
  3. has_one :shop, :bar, :winter_resort
  4. end
  5.  
  6. class Building < ActiveRecord::Base
  7. belongs_to :province
  8. end
  9.  
  10. class Shop < Building
  11. def buy
  12. end
  13. end
  14.  
  15. class Bar < Building
  16. def drink
  17. end
  18. end
  19.  
  20. class WinterResort < Building
  21. def take_lift
  22. end
  23. end
Advertisement
Add Comment
Please, Sign In to add comment