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



30
31
32
# File 'lib/generators/rails/controller_generator.rb', line 30

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

#generate_test_fileObject



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

def generate_test_file
  framework = configuration.test_framework

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