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)
[email protected]{|u| u==tabla}
if current_book
@books.delete(current_book)
else
@books<<tabla
end
end
so in @books (array) i have the data, so here it comes my problem, i
need to send all the data stored in the array for another controller for
store in a new table, i have a view:
<% form_tag :controller=>‘table’,:action=>‘send’,:id=>@user.books do-%>
choosen books
<–! here is where i print on the view the data of the array in the
model–>
<% for log in @user.books%>
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