Hi, I''m searching a metod to do a selection suck as: Select attribute1,attribute2 from table where conditions I know that the "find()" and "find_by_sql" methods takes all the attribute...But i want only attribute1 and attribute2...Can someone tell me if there''s a method that give me this opportunity? Thanks,Ivan. -- Posted via http://www.ruby-forum.com/.
Ivan Medda wrote:> Hi, > > I''m searching a metod to do a selection suck as: > > Select attribute1,attribute2 > from table > where conditions > > I know that the "find()" and "find_by_sql" methods takes all the > attribute...But i want only attribute1 and attribute2...Can someone tell > me if there''s a method that give me this opportunity? > > Thanks,Ivan.Hi, you can use find(:select => "attribute1, attribute2", ...) -- Agnieszka -- Posted via http://www.ruby-forum.com/.