Let's say I have a number 5
How would I convert this to an array [1, 2, 3, 4, 5]
?
The application here is I have an instance variable @pages and I want to create a pagination view.
https://apidock.com/ruby/Integer/times pointed me to a solution
pages = 5
(1..pages).each { |n| puts n }