I personally never had to do that, but if you think you might need this
feature again sooner or later, I'd suggest to release a gem. It will keep
you code decoupled and might potentially help others.
On Apr 15, 2013 5:35 PM, "Ian Young" <[email protected]> wrote:
> Hey all,
>
> I recently spent some time messing with the 3.2 asset pipeline to get it
> to behave in a certain way. I'm trying to decide if I should bother
> packaging it into a gem, and it would be helpful for me to know if anyone
> else has run into the same issue.
>
> What we wanted was to mount assets at a couple different places in our
> app. Most assets were fine at the default `/assets/` path, but we wanted
> certain ones available at `/addon/`. I didn't want to do it with nginx
> aliases because that seemed like inappropriately pushing application logic
> into the web server, and it wouldn't work in development.
>
> I came up with a solution that uses a config setting and takes care of the
> asset pipeline-y stuff automatically (including precompiling). The config
> looks like this:
>
> config.assets.extra_mountpoints = {
> '/addon/' => {
> :path => "lib/assets/other/addon",
> :precompile => [/.*\.js/]
> },
> }
>
> So, has anyone else wanted to do something similar? And would you be
> interested in a gem to help you do so?
>
> Ian
>
> --
> --
> SD Ruby mailing list
> [email protected]
> http://groups.google.com/group/sdruby
> ---
> You received this message because you are subscribed to the Google Groups
> "SD Ruby" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
--
--
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
---
You received this message because you are subscribed to the Google Groups "SD
Ruby" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.