put alias in Model.find query

Hi to all,

I want to be able to put alias to my Song.find query.
the artist field belongs to song model so that i could code efficiently
in sorting columns. I want to put an (s) alias to my Song model.

In the code below :select => "artist, g.genre_name AS name_genre"
should be
:select => "s.artist, g.genre_name AS name_genre"

In my controller:

@q = Song.find(:all, :select => "artist, g.genre_name AS name_genre",
:joins => "LEFT OUTER JOIN genres AS g on songs.genre_id = g.id", :order
=> params[:sort])

In my view:

<th><%= link_to "Artist", :sort => "artist"%></th>
<th><%= link_to "Genre", :sort => "genre_name"%></th>

Anyone has an idea how to do this?

Uhm...I figured out how to do it..

Song.find(:all, :select => "AS s artist, g.genre_name AS name_genre",
:joins => "LEFT OUTER JOIN genres AS g on songs.genre_id = g.id", :order
=> params[:sort])