# Passing non-existing parameters

**URL:** <https://www.ruby-forum.com/t/passing-non-existing-parameters/128954>\
**Category:** Rails\
**Created:** [February 13, 2008, 12:04am UTC](https://www.ruby-forum.com/t/passing-non-existing-parameters/128954 "2008-02-13T00:04:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![remcoh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c37758/32.png) [@remcoh](https://www.ruby-forum.com/u/remcoh)\
**Post date:** [February 13, 2008, 12:04am UTC](https://www.ruby-forum.com/t/passing-non-existing-parameters/128954/1 "2008-02-13T00:04:10Z")

</div>

perhaps an academic question:

i have this:

\<%= link\_to\_remote n,  
:url=\>people\_url({:div\_to\_update=\>“people\_container”,:organisation\_id=\>@organisation.id,:partial=\>“list\_row”,:page=\>n}),:method=\>:get  
%\>

as you can see in the parameter hash there is an organisation\_id, but  
sometimes this value is not present, so there is no @organisation  
instance variable.

I noticed that rails doesn’t bother, it just ignores this one in the url  
parameters it creates

Do you think it is ok to rely on the framework for checking these kind  
of things or should i check it myself before calling this method?

i know it works, but perhaps this is not so beautifull

---

<div class="post-metadata">

**Author:** ![remcoh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c37758/32.png) [@remcoh](https://www.ruby-forum.com/u/remcoh)\
**Post date:** [February 13, 2008, 12:47am UTC](https://www.ruby-forum.com/t/passing-non-existing-parameters/128954/2 "2008-02-13T00:47:55Z")

</div>

> instance variable.
> 
> I noticed that rails doesn’t bother, it just ignores this one in the url  
> parameters it creates
> 
> Do you think it is ok to rely on the framework for checking these kind  
> of things or should i check it myself before calling this method?
> 
> i know it works, but perhaps this is not so beautifull

Don’t do that… You sure that it’s not setting it? Or is it setting  
it  
to the same result as “nil.id” ?

Might want to double check that.
