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



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

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

#generate_test_fileObject



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

def generate_test_file
  framework = configuration.test_framework

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