Database Resolver for Rails 3