passing non-existing parameters

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

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

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.