Sha256: d9c521fd33b9136aec07282edbd82bb8e198807f676dd654ffcae274ecbd885c

Contents?: true

Size: 997 Bytes

Versions: 1

Compression:

Stored size: 997 Bytes

Contents

# frozen_string_literal: true

require 'rails/generators/erb/mailer/mailer_generator'
require 'rails/generators/mailer/mailer_generator'
require 'generators/rails/base'

module Erb
  module Generators
    class MailerGenerator
      include Rails::Base

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

      def generate_test_file
        framework = configuration.test_framework

        return if framework.nil?

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

    end
  end
end

module Rails
  module Generators
    class MailerGenerator
      include Rails::Base

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

      def generate_test_file
        framework = configuration.test_framework

        return if framework.nil?

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

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
active_generator-5.1.0 lib/generators/rails/mailer_generator.rb