In my .erb
, I have a simple each
loop:
<%= @user.settings.each do |s| %>
..
<% end %>
What is the simplest way to check if it's currently going through its first iteration? I know I could set i=0...i++
but that is just too messy inside of an .erb
. Any suggestions?