good day guys!
I\'m using find_by_sql() in rails 3 to fetch records as follows.
@list=Email.find_by_sql([\"SELECT * FROM Emails WHER
You can use a hash to name the interpolated values, like this:
@list = Email.find_by_sql(["SELECT * FROM Emails WHERE (sent_id = :id OR from_id = :id)", {:id => params[:id]}])