Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed Reference to ConfigurationHolder from HalfBaked #57

Merged
merged 1 commit into from
Mar 3, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.grails.plugin.resource.util

import org.codehaus.groovy.grails.commons.ConfigurationHolder
import org.codehaus.groovy.grails.plugins.support.aware.GrailsApplicationAware
import org.codehaus.groovy.grails.commons.GrailsApplication
import grails.util.Environment

/**
Expand All @@ -9,9 +10,10 @@ import grails.util.Environment
*
* NOTE this is a lame implementation that NEVER adds servletContextPath!
*/
class HalfBakedLegacyLinkGenerator {
class HalfBakedLegacyLinkGenerator implements GrailsApplicationAware {

def pluginManager
GrailsApplication grailsApplication

String resource(Map args) {
getResourceUrl(args)
Expand All @@ -23,7 +25,7 @@ class HalfBakedLegacyLinkGenerator {
* Copied from ApplicationTagLib
*/
String makeServerURL() {
def u = ConfigurationHolder.config?.grails?.serverURL
def u = grailsApplication.config?.grails?.serverURL
if (!u) {
// Leave it null if we're in production so we can throw
if (Environment.current != Environment.PRODUCTION) {
Expand Down