Sha256: 07bba1ea4ccf1889c1be8d3ee2a5dd39ec8ee2e4fa017a58a9fbbd84b297b5e7

Contents?: true

Size: 367 Bytes

Versions: 6

Compression:

Stored size: 367 Bytes

Contents

# frozen_string_literal: true

module ApplicationForm
  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.rb")
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
application_form-0.5.4 lib/generators/application_form/form_generator.rb
application_form-0.5.3 lib/generators/application_form/form_generator.rb
application_form-0.5.2 lib/generators/application_form/form_generator.rb
application_form-0.5.1 lib/generators/application_form/form_generator.rb
application_form-0.5.0 lib/generators/application_form/form_generator.rb
application_form-0.4.0 lib/generators/application_form/form_generator.rb