2

I have this:

static mappings = {
   "/a/b/$id/stuff"(controller: "stuff", action "action1" )
   "/a/b/$id/stuff/$stuffId"(controller: "stuff", action "action2" )
   "/a/b/$id/stuff/$stuffId/c"(controller: "stuff", action "action3" )
}

I can hit action1 and action2, but I can't hit action3, as it returns a 404.

What's going on?

Stefan Kendall
  • 66,414
  • 68
  • 253
  • 406

2 Answers2

1
def method(){

}

will not work.

def method = {


}

WILL work.

Stefan Kendall
  • 66,414
  • 68
  • 253
  • 406
  • 1
    Tip: use the codenarc grails plugin. It has a rule to catch this mistake, plus many other rules of varying usefulness. – ataylor Mar 04 '11 at 19:45
0

have you checked the code of your view? I guess if it can't compile, you'll get a 404. At least, that's what I experienced.

rdmueller
  • 10,742
  • 10
  • 69
  • 126