Sha256: 417cacac1935df7fe04f6ea80e7a3b365305eb237c38a0913e436322415e5005

Contents?: true

Size: 514 Bytes

Versions: 6

Compression:

Stored size: 514 Bytes

Contents

require "rails/generators/rails/controller/controller_generator"
require "inertia_rails_contrib/generators_helper"

module Inertia
  module Generators
    class ControllerGenerator < Rails::Generators::ControllerGenerator
      include InertiaRailsContrib::GeneratorsHelper

      source_root File.expand_path("./templates", __dir__)

      remove_hook_for :template_engine

      hook_for :inertia_templates, required: true, default: InertiaRailsContrib::GeneratorsHelper.guess_inertia_template
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
inertia_rails-contrib-0.3.0 lib/generators/inertia/controller/controller_generator.rb
inertia_rails-contrib-0.2.2 lib/generators/inertia/controller/controller_generator.rb
inertia_rails-contrib-0.2.1 lib/generators/inertia/controller/controller_generator.rb
inertia_rails-contrib-0.2.0 lib/generators/inertia/controller/controller_generator.rb
inertia_rails-contrib-0.1.1 lib/generators/inertia/controller/controller_generator.rb
inertia_rails-contrib-0.1.0 lib/generators/inertia/controller/controller_generator.rb