Also, this is interesting--I was refactoring to shorten-ify-icate the partials syntax, but apparently removing the partial: bit screws up how the collection: foo , as: :bar syntax.
partial:
collection: foo , as: :bar
So, this:
<%= render '/pages/cards/card', collection: session[:img_array], as: :img_hash %>
led to this:
Any idea why collection: isn't iterating through session[:img_array] and repeatedly passing each img_hash without the partial: explicitly there?
collection:
session[:img_array]
img_hash
With collection, I supposed short form doesn't work since the logic is too difficult.
collection
So I guess short form only works for non-collection partials
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Also, this is interesting--I was refactoring to shorten-ify-icate the partials syntax, but apparently removing the
partial:
bit screws up how thecollection: foo , as: :bar
syntax.So, this:
led to this:
Any idea why
collection:
isn't iterating throughsession[:img_array]
and repeatedly passing eachimg_hash
without thepartial:
explicitly there?With
collection
, I supposed short form doesn't work since the logic is too difficult.So I guess short form only works for non-collection partials