Forum: Ruby on Rails passing object ids with link_to_remote

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
David (Guest)
on 2009-01-21 17:40
(Received via mailing list)
When passing an array of objects in the :url part of link_to_remote
like so:

link_to_remote "Edit", :url => {:action => "test", :appts => @objects}

the params[:appts] holds the id's for all the objects in @objects.
This is what I want, but I did this by accident by trying to pass the
objects themselves.  I just wanted to confirm that this is the correct
behavior and also I was wondering if it possible to pass all the
objects and not have to waste another database query.
This topic is locked and can not be replied to.