rails loop view code example Example: rails loop while $i < $num do puts("Inside the loop i = #$i" ) $i +=1 end