In most instances, ActiveRecord's abstraction layer should be rich  
enough that you don't need to do this very often, but if you really  
have to you can run SQL commands on the database in at least two ways:

1) ActiveRecord::Base.connection.execute('select * from ....'). The  
thing to note here is that it will return the raw result object from  
the Postgres database adapter (http://ruby.scripting.ca/postgres/rdoc/ 
classes/PGresult.html)

2) If you're just doing a query on a specific model, you can do  
YourModelHere.find_by_sql('select * from yourmodeltable').

Best,

/Morten


On Jul 21, 2008, at 11:23 AM, mikong wrote:

>
> To import data, go to the Data tab in the edit application view. Click
> on the number of records beside the table name. You should be able to
> find the Import CSV form.
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to