Displaying 1 result from an estimated 1 matches for "fc_array".
Did you mean:
gc_array
2008 Apr 29
10
Better way to remove value from list??
...39;s all in my
controller. I''d be happy to move things around too. Any help on how to
do this much better would be appreciated.
@order = Order.find(params[:id])
@remove_item = params[:item]
@item_array = @order.item_codes.split(/,\s*/)
@item_array.delete(@remove_item)
@item_string = @fc_array.join(",")
@order.item_codes = nil
@order.item_codes = @fc_string
@order.save
THANKS!!!
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk&qu...