Access asset from asset-pipeline inside a gem

19 views
Skip to first unread message

Martin Trummer

unread,
Oct 3, 2014, 12:54:42 PM10/3/14
to rubyonra...@googlegroups.com
Hi @ all,

I have a gem, which implements an engine, to provide assets. Pretty much
like the following example:
http://brandonhilkert.com/blog/how-to-build-a-rails-engine/ However, my
gem serves images.

In a rails app, I can access the image using image_path - so far so
good.
My problem now is, how can I access these images from another gem?

This other gem is part of my rail app. But when I access the image from
there with image_path, I get images/foo.png rather than asses/foo.png.

It seems the asset-pipeline cannot find the image when calling this from
the gem.
Does anyone know, how do I access assets from a gem?

Thank you in advance!

BR Martin

--
Posted via http://www.ruby-forum.com/.
Reply all
Reply to author
Forward
0 new messages