Class: Cms::ModuleInstallation

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
InstallationActions
Defined in:
lib/cms/module_installation.rb

Overview

Provides a base class for Module installation generators.

Usage:

require 'cms/module_installation'
class MyModule::InstallGenerator < Cms::ModuleInstallation
  add_migrations_directory_to_source_root __FILE__
end

Class Method Summary collapse

Methods included from InstallationActions

#default_engine_path

Class Method Details

.add_migrations_directory_to_source_root(generator_file_object) ⇒ Object

This will be relative to the gem e.g. add_migrations_directory_to_source_root __FILE__



17
18
19
# File 'lib/cms/module_installation.rb', line 17

def self.add_migrations_directory_to_source_root(generator_file_object)
  source_root File.expand_path('../../../../../db/migrate/', generator_file_object)
end