Sha256: 87e3fd9fcc172f0f59e6394a550a904722d600012ec7b3cc3ee014977f3b3900

Contents?: true

Size: 368 Bytes

Versions: 1

Compression:

Stored size: 368 Bytes

Contents

# frozen_string_literal: true

module ActiveFormModel
  module Generators
    class FormGenerator < ::Rails::Generators::NamedBase
      class_option :model, type: :string
      source_root File.expand_path('templates', __dir__)

      def create_form
        template 'form.rb', File.join('app/forms', class_path, "#{file_name}_form.erb")
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
active_form_model-0.4.1 lib/generators/active_form_model/form_generator.rb