title: Grails global function in bootstrap
body: <p>I'm working with Grails 2.1.0 and bumped with this 2 year old post: <a href="https://stackoverflow.com/questions/14694558/is-there-a-way-to-make-functions-accessible-across-controllers-in-grails">Is there a way to make functions accessible across controllers in Grails?</a></p>
  
  <p>In there, Burt suggest to create a function that will be accessible to all controllers using Bootstrap. I have tried it with the findings that it works, however every time I modify the controller (add or delete whatever you may think) Grails gives me:</p>
  
  <blockquote>
    <p>No signature of method:
    mycontroller.myfunctionfrombootstrap() is applicable for
    argument types: () values: []</p>
  </blockquote>
  
  <p>Is this a "feature" of Grails 2.1.0? Am I missing something?</p>
  
  <p>Upgrading Grails IS NOT an option.</p>
  
  <p>In bootstrap I have:</p>
  
  <pre><code>for (controllerClass in grailsApplication.controllerClasses) {
      controllerClass.clazz.metaClass.myfunctionfrombootstrap= {
          return stuff; 
      }
  }
  </code></pre>