Class: RailsServices::Generators::FormGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
Fileable, Nameable
Defined in:
lib/generators/rails_services/form_generator.rb

Overview

generates a form object

Instance Method Summary collapse

Methods included from Fileable

#form_object_file, #form_spec_file, #form_unit_file, #object_directory, #service_object_file, #service_spec_file, #service_unit_file

Methods included from Nameable

#form_class_name, #module_name, #qualified_name, #service_class_name, #subfolder_name

Instance Method Details

#create_formObject



20
21
22
23
# File 'lib/generators/rails_services/form_generator.rb', line 20

def create_form
  template 'base_form.rb.erb', "app/forms/#{object_directory}/#{form_object_file}"
  create_test
end