José Fernando Dávila


3,310 Experience
33 Lessons Completed
0 Questions Solved


According to this previously, we could use "$." (before Ruby version 2.6). The best alternative I've found is the following:

CSV.foreach('example.csv', headers: true).with_index(1) do |row, index|
  puts index

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

© 2024 GoRails, LLC. All rights reserved.