How do I override asset_path while retaining access to the original?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How do I override asset_path while retaining access to the original?

Todd Blanchard
I've been banging my head on this for some days.

I am working on a multi-tenant rails application that wants to use themes for each tenant.

I have managed to customize view template finding with FileSystemResolver so that it prepends the current domain to the view search path and, if not found, removes it and uses the original one.  This works.

Assets, OTOH, have me stumped.  As near as I can figure, everything goes through ActionView::Helpers::AssetUrlHelper.asset_path(source,options).  That mostly does what I want but I want to prepend the domain to the source path.  

To make things extra fun, half the assets/views are in a gem (using Solidus as our store) and so a lot of my controllers are straight out of the Solidus engine.

I could really use some guidance on getting this working.

Thanks.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/5da9e5be-439c-489a-9488-f0124844d09e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.