Reputation: 27114
I'm setting up Prawn right now and for one param it wants to know the img location.
In their case they wrote :
img = "#{Prawn::BASEDIR}/data/images/card_cutout.jpg"
But that points to a local gems folder. How can I make this from the controller point to card_cutout.jpg
in my public/images/ folder.
I tried using an absolute link thinking it would work like a website but I was wrong :
img = "http://www.website.com/images/card_cutout.jpg
Thanks in advance!
Upvotes: 0
Views: 566
Reputation: 115292
Try this:
img = "#{Rails.root/public/images/card_cutout.jpg}"
Upvotes: 1