Sha256: d55b3f9147677b7726aa1170e5436c34fc9bc6c004af45d6d0f131765773abc2
Contents?: true
Size: 1.06 KB
Versions: 37
Compression:
Stored size: 1.06 KB
Contents
# frozen_string_literal: true module RailsAppGenerator # Custom add-ons for RailsAppGenerator module AddOns # Add Rails Generator configuration to rails application class Generators < AddOn def apply directory('lib/generators/rails/navigation', 'lib/generators/rails/navigation') if uses?(:views) template = 'lib/generators/rails/scaffold_controller_generator.rb' template(template) if uses?(:scaffold) generators = <<-RUBY config.generators do |generate| #{"require_relative '../lib/generators/rails/scaffold_controller_generator'" if uses?(:scaffold)} generate.helper false generate.javascripts false generate.request_specs false generate.routing_specs false generate.stylesheets false #{'generate.test_framework :rspec' if uses?(:rspec)} generate.view_specs false #{'generate.factory_bot true' if uses?(:factory_bot)} end RUBY inject_into_file 'config/application.rb', generators, before: /^ {2}end\n/ end end end end
Version data entries
37 entries across 37 versions & 1 rubygems