Re: extracting username

Try…

@authenticated_user = User.find(1) # or your SQL find, without the
:select

<%= @authenticated_user.login %>

HTH,
Nathan