Fix ActionText::Editor::Tag#render_in to accept kwargs#57356
Merged
guilleiguaran merged 1 commit intoMay 12, 2026
Conversation
Since d24d0b7, Action View calls `render_in(context, locals: ...)`. Subclasses that call `super` from `render_in(view_context, ...)` raised ArgumentError. Accept and ignore extra kwargs in the base.
seanpdoyle
approved these changes
May 12, 2026
seanpdoyle
left a comment
Contributor
There was a problem hiding this comment.
Thank you for catching and changing this. The latest version of #50623 was opened long before the Action Text adapter changes were proposed and merged.
Are there any additional changes to be made to make the Action View deprecation warning more robust to handle situations like this?
4 tasks
Member
Author
I don't think so? The so I think this is just an order-of-merge-operations issue! 😆 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation / Background
Since d24d0b7 (#50623), Action View renders objects responding to
#render_inthroughActionView::Template::Renderable#render, which calls:when
render_in's arity is not 1.ActionText::Editor::Tag#render_in(view_context)was not updated to match the new contract. Subclasses that follow the documented adapter patternrender_in(view_context, ...)and callsuperraise:The bundled
TrixEditor::Tagdoesn't hit this because it re-implements the body and never callssuper. Out-of-tree adapters following the same pattern do.Detail
This Pull Request widens
ActionText::Editor::Tag#render_into(view_context, ...), so subclasses can callsuperwithout caring about Action View's calling convention.Additional information
Discovered while running Lexxy's CI against Rails
main. Lexxy's adapter atlib/action_text/editor/lexxy_editor.rbis the real-world subclass that surfaced this.Checklist
Before submitting the PR make sure the following are checked:
[Fix #issue-number]