Forum: Ruby on Rails array in the link

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.
669c735cf55efa005140fa232b05c4f6?d=identicon&s=25 daociyiyou (Guest)
on 2008-10-27 02:24
(Received via mailing list)
I have an array in an view link submitted to an action.This array
contains the objects which have not any relation each other,they also
have no model relation.The link look like this :
###############################
<%=link_remote_to
"agree",:url=>{:action=>"agree",:id=>[object1,object2],...}-%>
###############################
In the action,how do i parse the params[:id] ?,object1=params[:id][0]
and object2=params[:id][1]? It is wrong.I check the development log,id
was submitted like this : "2/5".So who can help me?
D22781eccd92073acd6a1ed350c3d136?d=identicon&s=25 boblu (Guest)
on 2008-10-27 04:50
(Received via mailing list)
I don't think that you can pass an array or hash which is more than
one level from view to controller.
You'd better divide your objects into strings and pass them seperately
or arrange them in an array or hash which has only one level.
This topic is locked and can not be replied to.