Check what is comming in param

hi guys

i am checking with params[:a].nil? and params[:a].blank?

but in the url a is not coming but for some other purpose service i am using the same a for some other service

if some params is nit coming in url how to check

guide me

I don't understand the question. If a is not in the url then
params[:a] will be nil as you say. Please explain more in what way
this does not work for you.

Colin

Colin Law wrote:

I don't understand the question. If a is not in the url then
params[:a] will be nil as you say. Please explain more in what way
this does not work for you.

Colin

"I am checking with params[:VARNAME].nil? and params[:VARNAME].blank?.
My problem is that I use a variable VARNAME for some other purpose as
well. How can I tell?"

It does not matter if you have a variable called varname (don't use
VARNAME, upper case implies a constant in ruby). params[:varname]
checks whether the params hash contains an entry for the key varname
and is not affected by any variable called varname.