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.13.2 lib/generators/avo/install_generator.rb
avo-1.13.1 lib/generators/avo/install_generator.rb
avo-1.13.0 lib/generators/avo/install_generator.rb
avo-1.12.4 lib/generators/avo/install_generator.rb
avo-1.12.3 lib/generators/avo/install_generator.rb
avo-1.12.2 lib/generators/avo/install_generator.rb
avo-1.12.1 lib/generators/avo/install_generator.rb
avo-1.12.0 lib/generators/avo/install_generator.rb
avo-1.11.6 lib/generators/avo/install_generator.rb
avo-1.11.5 lib/generators/avo/install_generator.rb
avo-1.11.4 lib/generators/avo/install_generator.rb
avo-1.11.3 lib/generators/avo/install_generator.rb
avo-1.11.2 lib/generators/avo/install_generator.rb
avo-1.11.1 lib/generators/avo/install_generator.rb
avo-1.10.3 lib/generators/avo/install_generator.rb
avo-1.11.0 lib/generators/avo/install_generator.rb
avo-1.10.2 lib/generators/avo/install_generator.rb
avo-1.10.1 lib/generators/avo/install_generator.rb
avo-1.10.0 lib/generators/avo/install_generator.rb
avo-1.9.1 lib/generators/avo/install_generator.rb