Sha256: 005cd213d14851058ccacec4700fae304a7c6bafad34c109ad5e6eca50421e20

Contents?: true

Size: 1 KB

Versions: 1

Compression:

Stored size: 1 KB

Contents

require 'rails/generators/erb/controller/controller_generator'
require 'rails/generators/rails/controller/controller_generator'

module Erb
  module Generators
    class ControllerGenerator

      def generate_locale_file
        invoke('locale:view'.freeze, [name]) if ActiveGenerator.configuration.autoload_view_generator_locale
      end

      def generate_test_file
        unless ActiveGenerator.configuration.test_framework.nil?
          invoke("#{ActiveGenerator.configuration.test_framework}:view", [name]) rescue nil
        end
      end

    end
  end
end

module Rails
  module Generators
    class ControllerGenerator

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

      def generate_test_file
        unless ActiveGenerator.configuration.test_framework.nil?
          invoke("#{ActiveGenerator.configuration.test_framework}:controller", [name]) rescue nil
        end
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
active_generator-2.3.0 lib/generators/rails/controller_generator.rb