Skip to content

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

19 lines (14 sloc) 0.575 kb
# 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}, ""
Jump to Line
Something went wrong with that request. Please try again.