chi-rb/chi-authorization

View on GitHub
lib/generators/chi/authorization/install/install_generator.rb

Summary

Maintainability
A
0 mins
Test Coverage
require 'rails/generators'

module Chi
  module Authorization
    module Generators
      class InstallGenerator < Rails::Generators::Base

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

        def create_initializer_file
          copy_file 'initializer.rb', 'config/initializers/authorization.rb'
        end

        def create_configuration_file
          copy_file 'configuration.rb', 'config/authorization.rb'
        end

      end
    end
  end
end