Class: Rails::Generators::ControllerGenerator

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/generators/rails/controller_generator.rb

Instance Method Summary collapse

Instance Method Details

#generate_locale_fileObject



33
34
35
# File 'lib/generators/rails/controller_generator.rb', line 33

def generate_locale_file
  invoke('locale:controller', [name]) if configuration.autoload_controller_generator_locale
end

#generate_test_fileObject



37
38
39
40
41
42
43
# File 'lib/generators/rails/controller_generator.rb', line 37

def generate_test_file
  framework = configuration.test_framework

  return if framework.nil?

  invoke("#{framework}:controller", [name]) rescue nil
end