params[:user] isnt the username, its a hash which contains all form parameters like username and all the other stuff from the form
try this:
username = params[:user][:username]
params[:user] isnt the username, its a hash which contains all form parameters like username and all the other stuff from the form
try this:
username = params[:user][:username]