You can override a lot of the defaults from ActiveRecord in order to work with legacy databases, so that you can perform something like the above with ActiveRecord.
class MyTable < ActiveRecord::Base
See http://wiki.rubyonrails.com/rails/pages/HowToUseLegacySchemas for more examples.
If your rails app and this model use entirely different databases. See the comments on this post for more on that (there may be a better reference but this is the best 2 minutes with google pulled up):