Skip to content

Plugabble routes don't work at all #16

@danielkza

Description

@danielkza

I have this:

package controllers

import play.api.mvc._
import play.navigator._

object WtRoutes
  extends PlayNavigator
{
  val posts = "posts" --> Posts.Routes
  val test = GET on root to Posts.index
}
package controllers

object Posts {
  case class Routes(parent: PlayNavigator)
    extends PlayModule(parent)
    with Controller
  {
    val list    = GET    on root     to Posts.index
    val getById = GET    on root / * to Posts.getById
    val create  = POST   on root     to Posts.create
    val putById = PUT    on root / * to Posts.putById
    val delete  = DELETE on root / * to Posts.deleteById
  }
}

Routes for post don't exist at all. Only the test route works. Debugging shows the plugged routes are not present at all in the routing list. I actually don't see anywhere how the child routes are 'passed over' to the parent or checked in any way. So either the instructions are wrong or there is some code missing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions