Sha256: 055820525b5d351a52a5c56f1a5bc3050e106e4ebad957a67c391e2a23c169e0

Contents?: true

Size: 441 Bytes

Versions: 2

Compression:

Stored size: 441 Bytes

Contents

class MongoInitializerGenerator < Rails::Generator::Base
  attr :file_name 
  
  def initialize(runtime_args, runtime_options = {})
    super
    @file_name = @args.first || 'default'
  end

  def manifest
    record do |m|
      m.directory 'config'
      m.directory 'config/initializers'
      
      m.template 'database.yml', "config/mongodb.yml"
      m.template 'initializer.rb', "config/initializers/mongomapper.rb"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mongo_mapper_generators-1.0.5 rails_generators/mongo_initializer/mongo_initializer_generator.rb
mongo_mapper_generators-1.0.4 rails_generators/mongo_initializer/mongo_initializer_generator.rb