Class: Cms::InstallGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/cms/install/install_generator.rb

Overview

A generic generator for installing BrowserCMS modules into a project. This will do the following:

  1. Add the Gem to your Gemfile

  2. Call the name_of_module:install generator for that gem.

  3. Add the routes to the project

Instance Method Summary collapse

Instance Method Details

#add_and_install_moduleObject



13
14
15
16
17
# File 'lib/generators/cms/install/install_generator.rb', line 13

def add_and_install_module
  gem name
  generate("#{name}:install")
  route "routes_for_#{name}"
end