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:
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).
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.