Flowdock
method

create_parts

Importance_0
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: ActionMailer::OldApi

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v3.1.0) is shown here.

create_parts() protected

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/old_api.rb, line 200
    def create_parts
      if String === @body
        @parts.unshift create_inline_part(@body)
      elsif @parts.empty? || @parts.all? { |p| p.content_disposition =~ /^attachment/ }
        lookup_context.find_all(@template, [@mailer_name]).each do |template|
          self.formats = template.formats
          @parts << create_inline_part(render(:template => template), template.mime_type)
        end

        if @parts.size > 1
          @content_type = "multipart/alternative" if @content_type !~ /^multipart/
        end

        # If this is a multipart e-mail add the mime_version if it is not
        # already set.
        @mime_version ||= "1.0" unless @parts.empty?
      end
    end
Register or log in to add new notes.