Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: d5c56fc2cf
Fetching contributors…

Cannot retrieve contributors at this time

file 18 lines (14 sloc) 0.575 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
# setup mongoid gem
gem 'bson_ext', '1.2.0'
gem 'mongoid', '>=2.0.0.beta.20'
gem 'remarkable_mongoid', :group => :test

# append generator
inject_into_file "config/application.rb", :after => "config.generators do |generator|\n" do
  (" " * 6) + "generator.orm :mongoid\n"
end

# remove old database configuration
remove_file "config/database.yml"

# insert mongoid configuration file
get "#{File.dirname(__FILE__)}/resources/mongoid.yml", "config/mongoid.yml"

# remove activerecord railtie require
gsub_file "config/application.rb", %{require "active_record/railtie"\n}, ""
Something went wrong with that request. Please try again.