[Solved] how iterate over fixnum [closed]


How about this:

<% current_user.bar.caipirinha.to_i.times  do |s|  %>
  <%= s.caipirinha %>
<% end %>

You can use the to_i method to convert caipirinha to an integer, then call times on it.

1

solved how iterate over fixnum [closed]