I would suggest using fetch to grab parameters out of the params hash - http://www.ruby-doc.org/core-1.9.3/Hash.html#method-i-fetch