Sha256: b249c4480c85dae7665135ca2050616db451bf958fffd1b8cab98967996a0bdf

Contents?: true

Size: 444 Bytes

Versions: 2

Compression:

Stored size: 444 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.file 'database.yml', "config/database.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.1 rails_generators/mongo_initializer/mongo_initializer_generator.rb
mongo_mapper_generators-1.0.0 rails_generators/mongo_initializer/mongo_initializer_generator.rb