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

Allow to pass locals when rendering a collection #27

Closed
marcoroth opened this issue Jul 25, 2020 · 0 comments · Fixed by #28
Closed

Allow to pass locals when rendering a collection #27

marcoroth opened this issue Jul 25, 2020 · 0 comments · Fixed by #28
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@marcoroth
Copy link
Member

Feature Request

Allow to pass locals when rendering a collection

Is your feature request related to a problem?

In order to stay as close as possible to the render method in Rails it would make sense to support the passing of locals when rendering a collection.

While you can do this with render:

<%= render partial: 'items/card', collection: @cards, as: :card, locals: { selected: true } %>

You can't do this with futurize:

<%= futurize partial: 'items/card', collection: @cards, as: :card, extends: :div, locals: { selected: true } do %>
  <div class="spinner"></div>
<% end %>

Describe the solution you'd like

To most logical would be (as described above):

<%= futurize partial: 'items/card', collection: @cards, as: :card, extends: :div, locals: { selected: true } do %>
  <div class="spinner"></div>
<% end %>
@julianrubisch julianrubisch added enhancement New feature or request good first issue Good for newcomers labels Jul 25, 2020
marcoroth added a commit to marcoroth/futurism that referenced this issue Jul 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants