Sha256: 985384b05660945b8dc58bda752c2177f29e04ea1558cdb2155cbb1fe4a4a14e
Contents?: true
Size: 574 Bytes
Versions: 11
Compression:
Stored size: 574 Bytes
Contents
# encoding: utf-8 module MongoMapper module Generators class ConfigGenerator < Rails::Generators::Base desc "creates the MongoMapper configuration at config/mongo.yml" argument :database_name, :type => :string, :optional => true def self.source_root @source_root ||= File.expand_path("../templates", __FILE__) end def app_name Rails::Application.subclasses.first.parent.to_s.underscore end def create_config_file template 'mongo.yml', File.join('config', "mongo.yml") end end end end
Version data entries
11 entries across 11 versions & 3 rubygems