Sha256: d837b6335b569263fd1e10659fbbcaae67a80d160a9e0b517da13bf72dbc6117

Contents?: true

Size: 700 Bytes

Versions: 7

Compression:

Stored size: 700 Bytes

Contents

module Cmor::MultiTenancy::Frontend
  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_multi_tenancy_frontend.rb'
      end

      def generate_routes
        route File.read(File.join(File.expand_path('../templates', __FILE__), 'routes.source'))
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
cmor_multi_tenancy_frontend-0.0.60.pre lib/generators/cmor/multi_tenancy/frontend/install/install_generator.rb
cmor_multi_tenancy_frontend-0.0.59.pre lib/generators/cmor/multi_tenancy/frontend/install/install_generator.rb
cmor_multi_tenancy_frontend-0.0.58.pre lib/generators/cmor/multi_tenancy/frontend/install/install_generator.rb
cmor_multi_tenancy_frontend-0.0.57.pre lib/generators/cmor/multi_tenancy/frontend/install/install_generator.rb
cmor_multi_tenancy_frontend-0.0.56.pre lib/generators/cmor/multi_tenancy/frontend/install/install_generator.rb
cmor_multi_tenancy_frontend-0.0.55.pre lib/generators/cmor/multi_tenancy/frontend/install/install_generator.rb
cmor_multi_tenancy_frontend-0.0.54.pre lib/generators/cmor/multi_tenancy/frontend/install/install_generator.rb