I've seen a number of ways to use AR outside of rails, and am
wondering what other think is the best approach for my particular
The application is in it's own module namespace. To use it within
rails you just require it in application.rb and instantiate a class to
call methods on. It's also well suited to be used from other various
applications though. The simplest way I could think of to make my
application work inside and outside of rails without much user
intervention would be something like this.
if ENV and ENV.has_key?('RAILS_ENV')
I'd probably use a yaml file to store the database configuration like
Any better ideas?