Skip to content

Instantly share code, notes, and snippets.

@hodak
Last active August 29, 2015 13:57
Show Gist options
  • Save hodak/9758141 to your computer and use it in GitHub Desktop.
Save hodak/9758141 to your computer and use it in GitHub Desktop.
Iterate with partials RoR
- @notes.each_with_index do |note, index|
# = render partial: 'notes/note', locals: { note: note, index: index + 1 }
= render 'notes/note', note: note, index: index + 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment