From: Phillip Gawlowski Date: 2008-05-09T02:40:27+09:00 Subject: Re: Writing a SQL Query in Active Record? -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Anukul Singhal wrote: | I am not using rails. Want to run the query only using Active Record on | Ruby (Scite Editor) Yes, that is what ActiveRecord's #find and #find_by_sql methods do. Rails uses ActiveRecord, but ActiveRecord works without using Rails itself. | Can you give any prototype as to how I can proceed writing a simple | "SELECT" query after establishing the connection with the sql server db? class Table < ActiveRecord::Base; end select = Table.find :all - -- Phillip Gawlowski Twitter: twitter.com/cynicalryan Blog: http://justarubyist.blogspot.com ~ How many boards would the Mongols hoard if the Mongol hordes got bored? -- Calvin -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkgjOwUACgkQbtAgaoJTgL8NVQCgpLIP+PbwTxDnEhXiXDg3sLlc gy0An3GewesORQjT2Q7uQlvbEpUuRyi4 =8Svr -----END PGP SIGNATURE-----