Skip to content

Commit

Permalink
fix logo image display
Browse files Browse the repository at this point in the history
  • Loading branch information
alepore committed Oct 22, 2015
1 parent f97bf2f commit 8fde0b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/spree/admin/orders/invoice.pdf.prawn
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repeat(:all) do
im = Rails.application.assets.find_asset(Spree::PrintInvoice::Config[:logo_path])

if im && File.exist?(im.pathname)
image im, vposition: :top, height: 40, scale: Spree::PrintInvoice::Config[:logo_scale]
image im.filename, vposition: :top, height: 40, scale: Spree::PrintInvoice::Config[:logo_scale]
end

grid([0,3], [0,4]).bounding_box do
Expand Down

2 comments on commit 8fde0b6

@naw
Copy link

@naw naw commented on 8fde0b6 Nov 27, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get undefined method 'filename' for #<Sprockets::StaticAsset:0x007f3ea59ea238>

Works fine with im instead of im.filename.

What is the purpose of this commit?

Is there a reason the code for the packaging slip template wasn't also changed?

Thanks!

@alepore
Copy link
Member Author

@alepore alepore commented on 8fde0b6 Dec 1, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was a quick fix because im.filename was working for me, and im was not.
i also saw this was already present on master.

is this maybe dependent on the version of some library, like Sprockets?

Please sign in to comment.