Sha256: 27367c701ce93716b687fcabd2dc927e69456ff76988a519801b419476124139

Contents?: true

Size: 525 Bytes

Versions: 5

Compression:

Stored size: 525 Bytes

Contents

module Ecm
  module Rbac
    module Generators
      class InstallGenerator < Rails::Generators::Base
        desc 'Generates the intializer'

        source_root File.expand_path('../templates', __FILE__)

        attr_reader :user_class_name

        def initialize(*args)
          super
          @user_class_name = ENV.fetch('ECM_RBAC_USER_CLASS_NAME') { 'User' }
        end

        def generate_initializer
          template 'initializer.rb', 'config/initializers/ecm_rbac.rb'
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ecm_rbac-2.0.0 lib/generators/ecm/rbac/install/install_generator.rb
ecm_rbac-1.2.1 lib/generators/ecm/rbac/install/install_generator.rb
ecm_rbac-1.2.0 lib/generators/ecm/rbac/install/install_generator.rb
ecm_rbac-1.0.1 lib/generators/ecm/rbac/install/install_generator.rb
ecm_rbac-1.0.0 lib/generators/ecm/rbac/install/install_generator.rb