The options you get are
{"commit"=>"Create", "utf8"=>"\342\234\223", "authenticity_token"=>"RKYZNmRaElg/hT5tlmLcqnstnOapdhiaWmDcjNDtSOI=", "action"=>"create", "note"=> {"name"=>"note1", "detail"=>"detail"}, "controller"=>"notes", "custom_date"=>"03-03-2010"}
This clearly shows that
its not params[:custom_date] , but it is params['custom_date']
UPDATE
The Date.strptime method follows a specific template. for instance
str = "01-12-2010" #DD-MM-YYYY then use Date.strptime(str,"%d-%m-%Y")
but if
str = "2010-12-01" #YYYY-MM-DD then use Date.strptime(str,"%Y-%m-%d")
source share