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

Should be possible to provide locals for collection. #58

Open
skatkov opened this issue Aug 23, 2024 · 0 comments
Open

Should be possible to provide locals for collection. #58

skatkov opened this issue Aug 23, 2024 · 0 comments

Comments

@skatkov
Copy link
Contributor

skatkov commented Aug 23, 2024

We can provide collection to render with partial, but it's impossible to provide local variable that goes along with it.

This

pb.friends "racers/racer", as: :racer, collection: [Racer.new(1, "Johnny Test", []), Racer.new(2, "Max Verstappen", [])]

Should be possible to do this:

pb.friends "racers/racer", as: :racer, collection: [Racer.new(1, "Johnny Test", []), Racer.new(2, "Max Verstappen", [])], locals: { account: current_account }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant