Fragment Caching in Rails 7.1+ requires HAML 6

Posted . Visible to the public.

Rails slightly changed the fragment cache implementation from Rails 7.0 Show archive.org snapshot to Rails 7.1 Show archive.org snapshot . Unfortunately, this is incompatible with how Haml 5 patches Action View buffers Show archive.org snapshot . I tried turning a String buffer into an ActionView::OutputBuffer, but this brought up other issues.

Conclusion

While we have a Rails 7.2 application running with HAML 5, Rails applications with fragment caching need to upgrade to HAML 6 when upgrading to Rails 7.1

Dominik Schöler
Last edit
Dominik Schöler
License
Source code in this card is licensed under the MIT License.
Posted by Dominik Schöler to makandra dev (2024-11-29 15:06)