chandragu...@gmail.com
unread,Nov 17, 2008, 2:20:00 AM11/17/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ruby on Rails: Talk
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