Sha256: aa80ac6816a8f063707b0c3379e526e9f8338c21f116bf3793bae0d66d5b28c4

Contents?: true

Size: 591 Bytes

Versions: 21

Compression:

Stored size: 591 Bytes

Contents

# frozen_string_literal: true

require_relative 'base'

module Bankai
  module Generators
    # :nodoc:
    class MailerGenerator < Base
      def configure_letter_opener
        inject_into_file(
          'config/environments/development.rb',
          configuration,
          after: 'config.file_watcher = ' \
          "ActiveSupport::EventedFileUpdateChecker\n"
        )
      end

      private

      def configuration
        <<-RUBY

  config.action_mailer.delivery_method = :letter_opener
  config.action_mailer.perform_deliveries = true
        RUBY
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
bankai-0.12.1 lib/bankai/generators/mailer_generator.rb
bankai-0.12.0 lib/bankai/generators/mailer_generator.rb
bankai-0.11.0 lib/bankai/generators/mailer_generator.rb
bankai-0.10.0 lib/bankai/generators/mailer_generator.rb
bankai-0.9.1 lib/bankai/generators/mailer_generator.rb
bankai-0.9.0 lib/bankai/generators/mailer_generator.rb
bankai-0.8.1 lib/bankai/generators/mailer_generator.rb
bankai-0.8.0 lib/bankai/generators/mailer_generator.rb
bankai-0.7.0 lib/bankai/generators/mailer_generator.rb
bankai-0.6.0 lib/bankai/generators/mailer_generator.rb
bankai-0.5.1 lib/bankai/generators/mailer_generator.rb
bankai-0.5.0 lib/bankai/generators/mailer_generator.rb
bankai-0.4.1 lib/bankai/generators/mailer_generator.rb
bankai-0.4.0 lib/bankai/generators/mailer_generator.rb
bankai-0.3.1 lib/bankai/generators/mailer_generator.rb
bankai-0.3.0 lib/bankai/generators/mailer_generator.rb
bankai-0.2.3 lib/bankai/generators/mailer_generator.rb
bankai-0.2.2 lib/bankai/generators/mailer_generator.rb
bankai-0.2.1 lib/bankai/generators/mailer_generator.rb
bankai-0.2.0 lib/bankai/generators/mailer_generator.rb