Sinatra と Sequel を PostgreSQL で使用しています。
認証後、ユーザー名を出力して歓迎したいのですが、データベースからユーザー名の値しか取得できず、ハッシュとして出てきます。
クエリは次のとおりです。
current_user = DB[:users].select(:username).where('password = ?', password).first
結果のデータは次のとおりです。
Welcome, {:username=>"Rich"}
かなり奇妙に見えますが、「ようこそ、リッチ」と読みたいと思います。
ここで何が間違っていますか?最後に「first」を付けずに同じクエリを試しましたが、どちらも機能しません。