PDA

View Full Version : extracting username


rubyonrails-talk
August 30th, 2006, 05:54 PM
Forgive my ignorance ya'll. I'm trying to extract a username from a
table using the user id.
I've tried:
@authenticated_user = User.find(:first, :select => "login", :conditions
=> "id = '1'")
AND:
@authenticated_user = User.find_by_sql("select login from users where
id='1'")
within an action that corresponds to a view that has