# Problem in passing params

**URL:** <https://www.ruby-forum.com/t/problem-in-passing-params/128760>\
**Category:** Rails\
**Created:** [February 11, 2008, 11:29am UTC](https://www.ruby-forum.com/t/problem-in-passing-params/128760 "2008-02-11T11:29:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![karthikeyan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/898d66/32.png) [@karthikeyan](https://www.ruby-forum.com/u/karthikeyan)\
**Post date:** [February 11, 2008, 11:29am UTC](https://www.ruby-forum.com/t/problem-in-passing-params/128760/1 "2008-02-11T11:29:35Z")

</div>

Hi,

I have a controller called students\_controller.rb

From a view file i am calling the index method by the URL like,

students\_path(:format =\> :json)

I have no problem in that. But i want to pass the teacher\_id as the  
parameter. Like,

students\_path(:format =\> :json, :teacher\_id =\> 5)

The problem here is, the parameter is passing as,

“amp;teacher\_id” =\> “5”

I want to get the correct params. Is there any way to pass correctly?

Thanks in advance.

- Karthik.
