# How to pass multiple parameters with a URL or link\_to?

**URL:** <https://www.ruby-forum.com/t/how-to-pass-multiple-parameters-with-a-url-or-link-to/110911>\
**Category:** Rails\
**Created:** [July 31, 2007, 11:53pm UTC](https://www.ruby-forum.com/t/how-to-pass-multiple-parameters-with-a-url-or-link-to/110911 "2007-07-31T23:53:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mister\_Yu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/22d042/32.png) [@Mister\_Yu](https://www.ruby-forum.com/u/Mister_Yu)\
**Post date:** [July 31, 2007, 11:53pm UTC](https://www.ruby-forum.com/t/how-to-pass-multiple-parameters-with-a-url-or-link-to/110911/1 "2007-07-31T23:53:49Z")

</div>

Hi all,

==in my countroller i want to do something like this:==

photo\_controller

def show  
@photo = Photo.find(params[:photo\_id])  
@place = Place.find(params[:place\_id))  
end

==so that in a view i can do something like this:==

place-\>show.rhtml

## \<%= @place.name %\>
\<%= image\_tag @photo.file.url %\>

how do i write the link\_to statement so that i can do that? something  
like:  
link\_to “Show the picture of the place”, { :controller =\>  
“photo”, :action =\> “show”, :photo\_id =\> @photo, :place\_id =\> @place}  
%\>

Thank you very much.
