Sha256: 01fc3d52c0ca4202d065269e0e003ac90263eb25c95d554518995fb490b0c906

Contents?: true

Size: 527 Bytes

Versions: 1

Compression:

Stored size: 527 Bytes

Contents

# frozen_string_literal: true

require 'rails/generators/rails/controller/controller_generator'
require 'inertia_rails/generators/helper'

module Inertia
  module Generators
    class ControllerGenerator < Rails::Generators::ControllerGenerator
      include InertiaRails::Generators::Helper

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

      remove_hook_for :template_engine

      hook_for :inertia_templates, required: true, default: InertiaRails::Generators::Helper.guess_inertia_template
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
inertia_rails-3.5.0 lib/generators/inertia/controller/controller_generator.rb