Sha256: fae101bf3fdc72c9a7f6ff4ada7f7c65028ff8961d93e0299c6ec114c86f6144

Contents?: true

Size: 1015 Bytes

Versions: 3

Compression:

Stored size: 1015 Bytes

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", [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", [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

3 entries across 3 versions & 1 rubygems

Version Path
active_generator-2.2.8 lib/generators/rails/controller_generator.rb
active_generator-2.2.7 lib/generators/rails/controller_generator.rb
active_generator-2.2.6 lib/generators/rails/controller_generator.rb