# Passing object ids with link\_to\_remote

**URL:** <https://www.ruby-forum.com/t/passing-object-ids-with-link-to-remote/158282>\
**Category:** Rails\
**Created:** [January 21, 2009, 4:40pm UTC](https://www.ruby-forum.com/t/passing-object-ids-with-link-to-remote/158282 "2009-01-21T16:40:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![david](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/aeb1de/32.png) [@david](https://www.ruby-forum.com/u/david)\
**Post date:** [January 21, 2009, 4:40pm UTC](https://www.ruby-forum.com/t/passing-object-ids-with-link-to-remote/158282/1 "2009-01-21T16:40:41Z")

</div>

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.
