Class XSendFile::Plugin
In: lib/x_send_file.rb
Parent: Object

Methods

Attributes

options    A class attribute that holds the default options for all x_send_file method calls. Set anything here that you normally pass to x_send_file or send_file as an option.

Public Class methods

Replaces Rails’ built-in send_file method with x_send_file. Use with caution! The normal send_file method can still be accessed using send_file_without_xsendfile.

[Source]

    # File lib/x_send_file.rb, line 34
34:     def self.replace_send_file!
35:       ActionController::Base.send(:alias_method_chain, :send_file, :x_send_file)
36:     end

[Validate]