Sha256: df91c73dbf345b896341188882e9a145526c4173d17862c8adbf8e87b3fda25d

Contents?: true

Size: 597 Bytes

Versions: 108

Compression:

Stored size: 597 Bytes

Contents

require "rails/generators"

module Generators
  module Avo
    class InstallGenerator < Rails::Generators::Base
      source_root File.expand_path("templates", __dir__)

      namespace "avo:install"
      desc "Creates an Avo initializer adds the route to the routes file."
      class_option :path, type: :string, default: "avo"

      def create_initializer_file
        route "mount Avo::Engine, at: Avo.configuration.root_path"

        template "initializer/avo.tt", "config/initializers/avo.rb"
        template "locales/avo.en.yml", "config/locales/avo.en.yml"
      end
    end
  end
end

Version data entries

108 entries across 108 versions & 1 rubygems

Version Path
avo-1.9.0 lib/generators/avo/install_generator.rb
avo-1.8.4 lib/generators/avo/install_generator.rb
avo-1.8.3 lib/generators/avo/install_generator.rb
avo-1.8.2 lib/generators/avo/install_generator.rb
avo-1.8.1 lib/generators/avo/install_generator.rb
avo-1.8.0 lib/generators/avo/install_generator.rb
avo-1.7.3 lib/generators/avo/install_generator.rb
avo-1.7.3.pre.1 lib/generators/avo/install_generator.rb