How to remove controller from grails programmatically?

1k views Asked by At

Im having some conflicts with the Searchable plugin.

I have a filter which fetches the controller in question in the before phase. It fetches the requested controller by finding the first controller that has the same name as controllerName which is a property available in grails filters.

however, my problem is that the Searchable plugin has its own SearchableController, and i myself have made my own version of the SearchableController. The effect of this is that i have two classes with the same name that would match controllerName in my find logic.

    controller = grailsApplication.controllerClasses.find { c ->
        c.logicalPropertyName == controllerName
    }

Can i somehow remove the SearchableController that comes with the plugin? What are my options?

2

There are 2 answers

0
Fabrizio D'Ammassa On BEST ANSWER
0
netbrain On

I worked around the issue by renaming my SearchableController class to SearchController. Don't like workarounds tho...