Flowdock
method

normalize_file_hash

Importance_0
v3.0.5 - Show latest stable - 0 notes - Class: ActionMailer::OldApi
normalize_file_hash(params) 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 132
    def normalize_file_hash(params)
      filename = File.basename(params.delete(:filename))
      content_disposition = "attachment; filename=\"#{File.basename(filename)}\""

      mime_type = params.delete(:mime_type)

      if (content_type = params.delete(:content_type)) && (content_type !~ /filename=/)
        content_type = "#{mime_type || content_type}; filename=\"#{filename}\""
      end

      params[:body] = params.delete(:data) if params[:data]

      { :content_type => content_type,
        :content_disposition => content_disposition }.merge(params)
    end
Register or log in to add new notes.