method

apply_defaults

Importance_0
v5.0.0.1 - 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 878
    def apply_defaults(headers)
      default_values = self.class.default.map do |key, value|
        [
          key,
          value.is_a?(Proc) ? instance_eval(&value) : 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.