Closed akimd closed 8 months ago
The README reads:
If this doesn't work, it uses the type gleaned from the filename, extension, and finally the declared type.
But the code is
fallback_type = for_declared_type(declared_type) || for_name(name) || for_extension(extension) || BINARY
so clearly the declared type is not checked last.
Which is unfortunate for my use case, so actually maybe the documentation is right wrt the intentions, but the code is wrong?
Yep, that's wrong. Updated the heuristic in https://github.com/rails/marcel/commit/2bbfd78cd30c5c3c9f17059aeb01797bd86807fd
Very clear addition to the documentation, thanks a lot!
The README reads:
But the code is
so clearly the declared type is not checked last.
Which is unfortunate for my use case, so actually maybe the documentation is right wrt the intentions, but the code is wrong?