From: Sijo Kg Date: 2008-11-17T17:50:04+09:00 Subject: mult dimensional arrays in ruby Hi What I am trying to do below is I have to enter two rows to the table contact_address_types like description(string) default_item(boolean) enabled(boolean) Home f t Business f t Then I tried like CONTACT_ADDRESS_TYPES = [["Home","f","t"],["Business","f","t"]] def self.up CONTACT_ADDRESS_TYPES.each do |array| ContactAddressType.create(:description => array[0]) ContactAddressType.create(:default_item => array[1]) ContactAddressType.create(:enabled => array[2]) end end But this not working Is this the correct way to do this?Please help Thanks in advance Sijo -- Posted via http://www.ruby-forum.com/.