Sha256: 5ecbebc5cd21a1841a1cfc8fb25a6dcf949ca0c754047ab6a0302259c9dcd51b
Contents?: true
Size: 623 Bytes
Versions: 104
Compression:
Stored size: 623 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
104 entries across 99 versions & 7 rubygems