Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Province < ActiveRecord::Base
- has_many :buildings
- has_one :shop, :bar, :winter_resort
- end
- class Building < ActiveRecord::Base
- belongs_to :province
- end
- class Shop < Building
- def buy
- end
- end
- class Bar < Building
- def drink
- end
- end
- class WinterResort < Building
- def take_lift
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment