From: Fernando Jesus Date: 2008-06-28T03:35:04+09:00 Subject: Problem with array Hi everybody well still im a newbie in this of ruby but i try to do my best for can solve my problem but this time im stuck in this i hoe you can help me IN A REDUCE WAY: how can i send the array that is write in the model for can manipulate it and can store in another table well any suggestion will be very helpfull IN A LONG WAY: Well the problem is that i use the example of agile web development for use the sessions in the shopping cart So when i add or remove data in my session or my array , cause in the model i have write something like this: attr_reader :books def initialize @books=[] end def add_tabla(tabla) current_book=@books.find{|u| u==tabla} if current_book @books.delete(current_book) else @books<'table',:action=>'send',:id=>@user.books do-%>

choosen books

Title Autor CB <--! here is where i print on the view the data of the array in the model--> <% for log in @user.books%> <%=h(log.title)%> <%=h(log.autor)%> <%=h(log.codbar)%> <%end%> <%=link_to_close_redbox "close"%>

<%=submit_tag 'Send'-%>

<%end-%> What im trying to do is send the array to another control for can manage and store in a new table. So how can i send in the correct way the array, cause when i read about params i can see that is a hash =S =S =S =S =S -- Posted via http://www.ruby-forum.com/.