Class: Mongomatic::Generators::ConfigGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/rails/generators/mongomatic/config/config_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



9
10
11
# File 'lib/rails/generators/mongomatic/config/config_generator.rb', line 9

def self.source_root
  @_source_root ||= File.expand_path("../templates", __FILE__)
end

Instance Method Details

#create_config_fileObject



17
18
19
# File 'lib/rails/generators/mongomatic/config/config_generator.rb', line 17

def create_config_file
  template 'mongomatic.yml', Rails.root.join('config', 'mongomatic.yml')
end

#defaultObject



13
14
15
# File 'lib/rails/generators/mongomatic/config/config_generator.rb', line 13

def default
  'test'
end