Commits

David Carr committed 6ba64ed

MongeezController: use same mongo as the MongeezRunner (#2)

Previously, this was wired up incorrectly. Specifically, if the mongo was specified via config or
by the mongodb plugin default, the controller would either get a non-Mongo instance or nothing
at all, failing in either case.

  • Participants
  • Parent commits 1745152

Comments (0)

Files changed (2)

File MongeezGrailsPlugin.groovy

         )
         def updateOnStart = application.config?.grails?.mongeez?.updateOnStart ?: false
         changeSetFileProvider(ReflectionsChangeSetFileProvider)
+        'grails.mongeez.MongeezController'(grails.mongeez.MongeezController) { bean ->
+            bean.scope = 'prototype'
+            bean.autowire = 'byName'
+            mongo = ref(mongoBeanName)
+        }
         mongeez(MongeezRunner) {
             executeEnabled = updateOnStart
             mongo = ref(mongoBeanName)

File src/docs/guide/releaseNotes.gdoc

 
 h4. 0.2.0 (TBD)
 * First public release
+* Fixed: MongeezController doesn't work with mongodb plugin ( "#2":https://bitbucket.org/davidmc24/grails-mongeez/issue/2/ )
 
 h4. 0.1.2 (September 12, 2012)
 * Private release