Skip to content

Commit

Permalink
Merge pull request #99 from crx/orm_fix
Browse files Browse the repository at this point in the history
Set default ORM in Rails 3.1
  • Loading branch information
samlown committed Jun 25, 2011
2 parents ca1d1cd + f6d8853 commit 4ba85b4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/couchrest/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
require "active_model/railtie"

module CouchRest
# = Active Record Railtie
class ModelRailtie < Rails::Railtie
config.generators.orm :couchrest_model
config.generators.test_framework :test_unit, :fixture => false
def self.generator
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
CouchRest::Model::Base.configure do |conf|
Expand Down

0 comments on commit 4ba85b4

Please sign in to comment.