Testing If Variable is Empty (nil)


/ Published in: Ruby
Save to your folder(s)

The code tests if session[:counter] exists. If you leave out the all important '?', it will fail with an error.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.