# Accessing Parameters - Params (nil)

**URL:** <https://www.ruby-forum.com/t/accessing-parameters-params-nil/59229>\
**Category:** Rails\
**Created:** [May 2, 2006, 4:45am UTC](https://www.ruby-forum.com/t/accessing-parameters-params-nil/59229 "2006-05-02T04:45:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/a8b319/32.png) [@ryan](https://www.ruby-forum.com/u/ryan)\
**Post date:** [May 2, 2006, 4:45am UTC](https://www.ruby-forum.com/t/accessing-parameters-params-nil/59229/1 "2006-05-02T04:45:12Z")

</div>

I’m trying to render a component that pulls information based on a  
parameter that is passed by a link\_to item, but my params object is nil  
for the following code in the controller:

records = ControllerName.find(params[:id])

but the error page also has this: Parameters: {“id”=\>“7”}

I’ve tried to access it (in the controller) using:

variable = params[:id]

but still nothing.

I’m sure this is basic. Is there a way to see what params are being  
recognized by the controller?

Any help or references are appreciated!

---

<div class="post-metadata">

**Author:** ![ryan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/a8b319/32.png) [@ryan](https://www.ruby-forum.com/u/ryan)\
**Post date:** [May 3, 2006, 7:05pm UTC](https://www.ruby-forum.com/t/accessing-parameters-params-nil/59229/2 "2006-05-03T19:05:29Z")

</div>

Hello Ryan,

> variable = params[:id]
> 
> but still nothing.
> 
> I’m sure this is basic. Is there a way to see what params are being  
> recognized by the controller?

How does your render\_component call look like ?

Try to pass the :id argument directly :

render\_component(:controller =\> :my\_controller, :action =\> :my\_action,  
:id =\> …)

Are you using Rails 1.1 ?

HTH,

– Jean-FranÃ§ois.
