search for: menu_item_type_id

Displaying 1 result from an estimated 1 matches for "menu_item_type_id".

2008 Oct 07
0
associations not saved in migration
...eTestMenuItemTypes < ActiveRecord::Migration def self.up type = MenuItemType.create :name => ''Sandwiches'' items = MenuItem.find_all_by_item_type "Sandwhich" for item in items do puts "item: #{item.name}, type id: #{type.id}" item.menu_item_type_id = type.id puts "item: #{item.name}, type id: #{item.menu_item_type_id}" item.save! end type = MenuItemType.create :name => ''Salads'' items = MenuItem.find_all_by_item_type "Salad" for item in items do puts "item: #{item....