user2931706
user2931706

Reputation:

Ruby Prawn how to show images in two columns

I've got an array of pictures, that i want to iterate and show in 2 column table like so:

enter image description here

but so far i'm getting this:

enter image description here

using this code:

@conclusion.assets.each do |f|
  image f.picture.path
  move_down 10
end

Upvotes: 1

Views: 541

Answers (1)

user2931706
user2931706

Reputation:

Yay! got it working, code:

column_box([0, cursor], columns: 2, width: bounds.width) do
  @conclusion.assets.each do |f|
    image f.picture.path
    move_down 10
  end
end

Upvotes: 3

Related Questions