Sha256: ef97afbe01795b1ebb09d1952a56fb872a2c8d42bb357c177695620bcf17de8b
Contents?: true
Size: 629 Bytes
Versions: 216
Compression:
Stored size: 629 Bytes
Contents
# encoding: utf-8 require 'rails/generators/mongoid_generator' module Mongoid module Generators class ConfigGenerator < Rails::Generators::Base desc "Creates a Mongoid configuration file at config/mongoid.yml" argument :database_name, :type => :string, :optional => true def self.source_root @_mongoid_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 'mongoid.yml', File.join('config', "mongoid.yml") end end end end
Version data entries
216 entries across 124 versions & 7 rubygems