Class: Shoelace::AssetProvider

Inherits:
ActionDispatch::Static
  • Object
show all
Defined in:
lib/shoelace/railtie.rb

Overview

The only reason this class exists is to clarify that we have a custom static file server after ‘ActionDispatch::Static`. We could just use `ActionDispatch::Static` directly, but it would make the result of `rake middleware` more difficult to understand, as the output would look like:

use ...
use ActionDispatch::Static
use ActionDispatch::Static # Why do we use the same middleware twice?
use ...

It is much more straightforward if it looks like:

use ...
use ActionDispatch::Static
use Shoelace::AssetProvider
use ...