Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CatalogArea
- # == Schema Information
- #
- # Table name: catalog_areas
- #
- # id :integer(4) not null, primary key
- # name :string(255)
- end
- class City
- # == Schema Information
- #
- # Table name: cities
- #
- # id :integer(4) not null, primary key
- # catalog_area_id :integer(4)
- # name :string(255)
- end
- class Deal
- # == Schema Information
- #
- # Table name: catalog_areas
- #
- # city :string(255)
- end
- #how should i do has_many and belongs_to to call this
- CatalogArea.first.deals
Add Comment
Please, Sign In to add comment