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.25.2 lib/generators/avo/install_generator.rb
avo-2.6.1.pre.2 lib/generators/avo/install_generator.rb
avo-2.6.1.pre.1 lib/generators/avo/install_generator.rb
avo-2.6.0 lib/generators/avo/install_generator.rb
avo-2.5.2.pre.7 lib/generators/avo/install_generator.rb
avo-2.5.2.pre.6 lib/generators/avo/install_generator.rb
avo-2.5.2.pre.5 lib/generators/avo/install_generator.rb
avo-2.5.2.pre.4 lib/generators/avo/install_generator.rb
avo-2.5.2.pre.3 lib/generators/avo/install_generator.rb
avo-2.5.2.pre.2 lib/generators/avo/install_generator.rb
avo-2.5.2.pre.1 lib/generators/avo/install_generator.rb
avo-2.5.1 lib/generators/avo/install_generator.rb
avo-2.5.0 lib/generators/avo/install_generator.rb
avo-2.4.1 lib/generators/avo/install_generator.rb
avo-2.4.0 lib/generators/avo/install_generator.rb
avo-2.3.1.pre.6 lib/generators/avo/install_generator.rb
avo-2.3.1.pre.5 lib/generators/avo/install_generator.rb
avo-2.3.1.pre.4 lib/generators/avo/install_generator.rb
avo-2.3.1.pre.3 lib/generators/avo/install_generator.rb
avo-2.3.1.pre.2 lib/generators/avo/install_generator.rb