I want to create a dataset of appointments from an instance variable @appointments. I have this code, but it does not work. My dataset only has one of the ten appointments in it. How can I modify this?
@appointments = Appointment.order(created_at: :asc).last(10)
@appointments.each do |appt|