method

apply_defaults

Importance_0
v5.2.3 - Show latest stable - 0 notes - Class: ActionMailer::Base
apply_defaults(headers) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionmailer/lib/action_mailer/base.rb, line 888
      def apply_defaults(headers)
        default_values = self.class.default.map do |key, value|
          [
            key,
            compute_default(value)
          ]
        end.to_h

        headers_with_defaults = headers.reverse_merge(default_values)
        headers_with_defaults[:subject] ||= default_i18n_subject
        headers_with_defaults
      end
Register or log in to add new notes.