Bidimensional Array

You don't need to declare it as bidirectional. Something like this may be what your looking for, if not supplying a little more information would help:

$itemlist = $itemlist[0] << Item.new('name1','value1')

This is assuming that Item.new returns an array, that would leave you with a multi-dimensional array.

Davicín .. wrote:

Looks like the constructor for your Item class only takes one argument. What is Item ? (and do you really want a global variable? that will fall over as soon as you have more than one mongrel or more than one user).

Fred

Hi, it appears that there’s an issue with the select method. Could you post it here?

Thanks,

-Conrad

def select   if !(params[:addLista]) then     $itemlist =     $itemlist << Item.new('Sobre el Bar','1')     $itemlist << Item.new('Dónde Estamos','1')     $itemlist << Item.new('Contactar','1')    end end

Item.new('Sobre el Bar','1') are trouble (ArgumentError) You should do:    Item.new(:name => 'Sobre el Bar', :number=>'1') mean you need describe methods/field names by your model Item.

/offtop donate to Yulia: http://www.yulia-site.org