I have an object named Puzzle and I'm calling .map on it in order to isolate the 'title' values. I then use 'puts' in order to print them neatly but nothing is returned.
def puzzle_find
title_array = self.puzzles.map { |s| s.title }
puts title_array
end
#=> " "
If I don't use 'puts' then I get the array like this:
def puzzle_find
title_array = self.puzzles.map { |s| s.title }
end
#=> ["title 1", "title 2", "title 3"]
I'm trying to make the output look like this in my view:
title 1
title 2
title 3
thanks