Skip to content

Allow template to return any kind of objects#51023

Merged
byroot merged 1 commit intorails:mainfrom
Shopify:av-non-string-template
Feb 9, 2024
Merged

Allow template to return any kind of objects#51023
byroot merged 1 commit intorails:mainfrom
Shopify:av-non-string-template

Conversation

@casperisfine
Copy link
Contributor

@casperisfine casperisfine commented Feb 9, 2024

Fix: #50930

While Action View is predominantly meant to render text, in some case it's used to render more complex object.

So we shouldn't assume #_run returns a buffer.

FYI: @kuwabarahiroshi, @julik

Fix: rails#50930

While Action View is predominantly meant to render text,
in sime case it's used to render more complex object.

So we shouldn't assume `#_run` returns a buffer.
@rails-bot rails-bot bot added the actionview label Feb 9, 2024
@byroot byroot merged commit 3b8222c into rails:main Feb 9, 2024
byroot added a commit that referenced this pull request Feb 9, 2024
Allow template to return any kind of objects
@byroot
Copy link
Member

byroot commented Feb 9, 2024

Backported to 7-1-stable as d8b2e58

@julik
Copy link
Contributor

julik commented Feb 10, 2024

❤️ thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rails 7.1 doesn't render Enumerator in view correctly

3 participants