Asset Pipeline interaction with grailsLinkGenerator and g:resource

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

Asset Pipeline interaction with grailsLinkGenerator and g:resource

David Estes
It has come to my attention that there are a few areas in grails-core that are “Resources” plugin aware


The ApplicationTagLib and the grailsLinkGenerator is affected by this and it appears to determine if the resources plugin is around by determining the existence of a bean.

Ideally we would prefer this to be decoupled from the grails-core codebase and managed from the context of a plugin. The question is what convention do we come up with to facilitate this change.

A couple thoughts are as follows:

1. alias_chain_method the methods in question (This is a ruby/Rails term) . In short, metaClass override the grails core methods with the plugins version which calls the original graiils-core method. This allows the grails-core version to still operate and lets the plugin intercept the method if it is necessary

2. Artefacts: Define an artefact type that these taglibs/generators understand and scan through when determining how to build a link and/or fetch a resource.

3. Leave the grails versions as is and write plugin specific beans and helpers for performing these tasks


The relevant JIRAs for these issues are:




Hopefully we can fuel a discussion as to a good approach here. Im currently leaning towards option 1 but there may be caveats with this approach.

-- 
David Estes

-- 
David Estes
Sent with Airmail