Forum: Ruby on Rails Passing an array List of Object

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Cb9f156090dfcfae68708c6b848b350b?d=identicon&s=25 chandragupta.mishra@gmail.com (Guest)
on 2008-11-17 10:51
(Received via mailing list)
Hi friends,

 I'm trying to pass an Array list of Objects that I have captured on
the fly after querying a web service. I have the array list available
with me. Now, the issue that I'm facing is that I would want to pass
the Array List of objects to another action defined in my controller.
Whenever I'm using the redirect_to function, The Array List is being
treated as String and I'm not able to manipulate (sort, paginate...)
the object list. Presently what I'm doing is I'm placing the Array
List in a session variable and performing the manipulations. However,
this is impacting the speed of program execution. I would really
appreciate any help from you guys.

To give you guys a feel of things..

================
Controller Code::
=================

def create_obj_list

  #=================================================
  #Code for initializing the call to the web service by calling the
Lib files
  #=================================================
  @new_arr=[]
  request=GetObjectsByCallingFunction(param0,param1)
  response=ObjectType.new
  response=getTheObjectListCall(request)
  response.each{ |arr
  @new_arr<<arr
 }

 #=================================================
 #This is where I'm trying to pass the Object list
 #=================================================

 redirect_to :action=>'passed_obj_list', :value=>@new_arr

end

def passed_obj_list
  @arr_for_manipulation=[]
  @arr_for_manipulation=params[:value]  #=> This is being treated as a
String.. No Objects are available..

  #=================================================
  # Code for Manipulation
  #=================================================

end

Hope to hear from you soon..

with warm regards,

Chandragupta
Cb9f156090dfcfae68708c6b848b350b?d=identicon&s=25 chandragupta.mishra@gmail.com (Guest)
on 2008-11-26 10:28
(Received via mailing list)
I guess there is no solution to this problem...

On Nov 17, 12:20 pm, "chandragupta.mis...@gmail.com"
This topic is locked and can not be replied to.