Grails

Docs wrongly claim GrailsApplication has a dynamic method named "add*Class"

Details

  • Type: Wish Wish
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.2 final
  • Component/s: Documentation
  • Labels:
    None

Description

The documentation (http://grails.org/doc/1.0.3/guide/12.%20Plug-ins.html) says:

[docs]
The dynamic method conventions are as follows:
...
add*Class - Adds a class for the given artefact type and returns the added GrailsClass instance - Example application.addControllerClass(ExampleController.class)
[/docs]

However a call to add*Class results in MissingMethodException. See the code attached

Activity

Hide
Graeme Rocher added a comment -

Assigning all documentation related issues to 1.2 final since they don't represent a change to the codebase

Show
Graeme Rocher added a comment - Assigning all documentation related issues to 1.2 final since they don't represent a change to the codebase
Hide
Graeme Rocher added a comment -

the * is a wildcard that you have to substitute for the appropriate artefact type (for example addDomainClass)

Show
Graeme Rocher added a comment - the * is a wildcard that you have to substitute for the appropriate artefact type (for example addDomainClass)
Hide
Lunohodov added a comment -

Graeme, it seems you did not check the attached application. Please do so. Thanks!

Show
Lunohodov added a comment - Graeme, it seems you did not check the attached application. Please do so. Thanks!
Hide
Lunohodov added a comment -

I am aware that the '*' is used as a wildcard. However I use the appropriate artefact type which in my case is addControllerClass(). Please see the TestGrailsPlugin.groovy within the attachment. Thank you!

Show
Lunohodov added a comment - I am aware that the '*' is used as a wildcard. However I use the appropriate artefact type which in my case is addControllerClass(). Please see the TestGrailsPlugin.groovy within the attachment. Thank you!

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: