Discussion:
Asset Pipeline interaction with grailsLinkGenerator and
David Estes
2014-03-26 16:06:55 UTC
Permalink
It has come to my attention that there are a few areas in grails-core that are “Resources” plugin aware

Example: http://grails.org/doc/latest/ref/Tags/resource.html

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:

http://jira.grails.org/browse/GRAILS-11246

http://jira.grails.org/browse/GRAILS-11243


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

Loading...