You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading a Rails app from 7.08 to 7.11 a custom template handler for markdown files throws this error:
ActionView::Template::Error: wrong argument type ActionView::OutputBuffer (expected String)
This is because the custom template handler uses the compiled output from ActionView::Template::Handlers::ERB. It used to be String but is now ActionView::OutputBuffer type in Rails 7.1 (rails/rails@ee68644)
Perhaps if redcarpet can be made to accept the buffer type directly then it might make this use case go faster or at least remove a bump when upgrading Rails :)
The text was updated successfully, but these errors were encountered:
After upgrading a Rails app from 7.08 to 7.11 a custom template handler for markdown files throws this error:
ActionView::Template::Error: wrong argument type ActionView::OutputBuffer (expected String)
This is because the custom template handler uses the compiled output from ActionView::Template::Handlers::ERB. It used to be String but is now ActionView::OutputBuffer type in Rails 7.1 (rails/rails@ee68644)
There is a workaround, to convert to String first: https://gist.github.com/KeithP/5f959ca70f0b09a1ce5b5cf4831829f6. But there appears to be quite a performance cost seen when running the tests.
Perhaps if redcarpet can be made to accept the buffer type directly then it might make this use case go faster or at least remove a bump when upgrading Rails :)
The text was updated successfully, but these errors were encountered: