Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add notes about renderable option to guide #48467

Merged
merged 2 commits into from
Jun 14, 2023

Conversation

swanson
Copy link
Contributor

@swanson swanson commented Jun 14, 2023

#39869 added the ability to use renderable as an option for render. This PR updates the guides to include this form of passing an object.

I needed to use this form of passing the object to work with Hotwire's broadcast_action_to method which is passing splatted args: https://github.com/hotwired/turbo-rails/blob/ea00f3732e21af9c2156cf74dabe95524b17c361/app/channels/turbo/streams/broadcasts.rb#L85-L87

@guilleiguaran guilleiguaran merged commit 01363bd into rails:main Jun 14, 2023
9 checks passed
@p8
Copy link
Member

p8 commented Jun 14, 2023

As render MyRenderable.new is basically syntactic sugar for render renderable: MyRenderable.new, maybe we should swap the examples and explain the :renderable option first?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants