From the output above, the line
puts params[:pass]
is printing
{"pass"=>"1234"}
This is a Hash
not a String
I'm not sure what's going on with your parameters, but it looks like the value is in `params[:pass][:pass] that you want to compare.
If you check out your log (by default in development at log/development.log
you should see all parameters. This can be useful for debugging.