Sha256: faa836a1666e0ba003f8224adf6bb474103cc7ba794e9c64ec0819e634706aa7
Contents?: true
Size: 672 Bytes
Versions: 26
Compression:
Stored size: 672 Bytes
Contents
module Cmor::Showcase module Generators class InstallGenerator < Rails::Generators::Base desc 'Generates the initializer' source_root File.expand_path('../templates', __FILE__) attr_reader :base_controller_class_name def initialize(*args) super @base_controller_class_name = ENV.fetch('BASE_CONTROLLER_CLASS_NAME') { '::ApplicationController' } end def generate_initializer template 'initializer.rb', 'config/initializers/cmor_showcase.rb' end def generate_routes route File.read(File.join(File.expand_path('../templates', __FILE__), 'routes.source')) end end end end
Version data entries
26 entries across 26 versions & 1 rubygems