method

download

Importance_0
v8.1.1 - Show latest stable - 0 notes - Class: MailersController
download() public

No documentation

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

Hide source
# File railties/lib/rails/mailers_controller.rb, line 22
  def download
    @email_action = File.basename(params[:path])
    if @preview.email_exists?(@email_action)
      @email = @preview.call(@email_action, params)
      send_data @email.to_s, filename: "#{@email_action}.eml"
    else
      raise AbstractController::ActionNotFound, "Email '#{@email_action}' not found in #{@preview.name}"
    end
  end
Register or log in to add new notes.