mileszs/wicked_pdf — Issue #56: Change the wicked_pdf_helper to 3.1 assets paths
Author: victorbueno
Created: 2011-10-12 23:24:36+00:00
State: open

I don't have experience on creating and testing rubygems yet. So, I'm gonna just send an idea.

The helper methods are being created using a join with the 'javascript', 'images' and 'stylesheet' paths. One thing that could work in development and production is to remove those directories and receive the asset_path or image_path instead.

Here comes an example:

```ruby
def wicked_pdf_image_tag(img_path, options={})
image_tag "file://#{Rails.root.join('public', img_path)}", options
end
```

and then we could use the helper method like this:

```ruby
<%= wicked_pdf_image_tag image_path('image.png') %>
```