Sha256: 1027b575320986e35be246ad86cb367a618bc90a92cb19416762fbc21e4a7749

Contents?: true

Size: 533 Bytes

Versions: 30

Compression:

Stored size: 533 Bytes

Contents

module Administrador
  module Generators
    class InstallGenerator < Rails::Generators::Base
      desc 'Generates the initializer'

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

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

      def generate_routes
        inject_into_file 'config/routes.rb', before: "\nend" do
          File.read(File.join(File.expand_path('../templates', __FILE__), 'routes.source'))
        end
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
administrador-0.0.10.pre lib/generators/administrador/install/install_generator.rb
administrador-0.0.9.pre lib/generators/administrador/install/install_generator.rb
administrador-0.0.8.pre lib/generators/administrador/install/install_generator.rb
administrador-0.0.7.pre lib/generators/administrador/install/install_generator.rb
administrador-0.0.6.pre lib/generators/administrador/install/install_generator.rb
administrador-0.0.5.pre lib/generators/administrador/install/install_generator.rb
administrador-0.0.4.pre lib/generators/administrador/install/install_generator.rb
administrador-0.0.3.pre lib/generators/administrador/install/install_generator.rb
administrador-0.0.2.pre lib/generators/administrador/install/install_generator.rb
administrador-0.0.1.pre lib/generators/administrador/install/install_generator.rb