Sha256: 3ca0faa97f43a33978e2e38edd2688b360cd04b31f22a0112624f91bae494be0

Contents?: true

Size: 1.1 KB

Versions: 4

Compression:

Stored size: 1.1 KB

Contents

# Application template recipe for the rails3_devise_wizard. Check for a newer version here:
# https://github.com/fortuity/rails3_devise_wizard/blob/master/recipes/mongoid.rb

if config['mongoid']
  say_wizard "REMINDER: When creating a Rails app using Mongoid..."
  say_wizard "you should add the '-O' flag to 'rails new'"
  gem 'bson_ext', '>= 1.3.0'
  gem 'mongoid', '>= 2.0.1'
else
  recipes.delete('mongoid')
end

if config['mongoid']
  after_bundler do
    say_wizard "Mongoid recipe running 'after bundler'"
    # note: the mongoid generator automatically modifies the config/application.rb file
    # to remove the ActiveRecord dependency by commenting out "require active_record/railtie'"
    generate 'mongoid:config'
    # remove the unnecessary 'config/database.yml' file
    remove_file 'config/database.yml'
  end
end

__END__

name: Mongoid
description: "Use Mongoid to connect to a MongoDB database."
author: fortuity

category: persistence
exclusive: orm
tags: [orm, mongodb]

args: ["-O"]

config:
  - mongoid:
      type: boolean
      prompt: Would you like to use Mongoid to connect to a MongoDB database?

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rails3_devise_wizard-0.3.2 recipes/mongoid.rb
rails3_devise_wizard-0.3.1 recipes/mongoid.rb
rails3_devise_wizard-0.2.8 recipes/mongoid.rb
rails3_devise_wizard-0.2.5 recipes/mongoid.rb