set default ORM in Rails 3.1

This commit is contained in:
Chase DuBois 2011-06-12 14:19:59 -04:00
parent 98772ae98a
commit f6d88530b7

View file

@ -2,10 +2,13 @@ require "rails"
require "active_model/railtie" require "active_model/railtie"
module CouchRest module CouchRest
# = Active Record Railtie
class ModelRailtie < Rails::Railtie class ModelRailtie < Rails::Railtie
config.generators.orm :couchrest_model def self.generator
config.generators.test_framework :test_unit, :fixture => false config.respond_to?(:app_generators) ? :app_generators : :generators
end
config.send(generator).orm :couchrest_model
config.send(generator).test_framework :test_unit, :fixture => false
initializer "couchrest_model.configure_default_connection" do initializer "couchrest_model.configure_default_connection" do
CouchRest::Model::Base.configure do |conf| CouchRest::Model::Base.configure do |conf|