-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Document Default controller in routing docs #6520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document Default controller in routing docs #6520
Conversation
|
Oh, looks like the docs are compiled, too. I took a look, but I'm running out of time to dig into how to set this straight. Any pointers welcome :-) |
|
You need to specify the full path to the controller type in routes: https://travis-ci.org/playframework/playframework/builds/157275557#L3208 |
| import play.api.mvc.Controller | ||
| import _root_.controllers.{Default => PlayDefault} | ||
|
|
||
| class Default extends Controller { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be great not to have to declare a new controller myself here, and just import the Default controller and be done with it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mikem Why not just
class Default extends _root_.controllers.Default?
It's somewhat annoying that we have to do this. I never really liked the fact that we have stuff in a top-level controllers package either (I would rather it be play.controllers or something).
Also: - correct the return code in the `Default` controller's `redirect` action Scaladoc - fix ScalaSirdRouter link
Also, tests for routing to Default controller.
c47c406 to
2614316
Compare
* Document Default controller in routing docs Also: - correct the return code in the `Default` controller's `redirect` action Scaladoc - fix ScalaSirdRouter link * Documentation compiles again Also, tests for routing to Default controller. * Simplify Default controllers
* Document Default controller in routing docs Also: - correct the return code in the `Default` controller's `redirect` action Scaladoc - fix ScalaSirdRouter link * Documentation compiles again Also, tests for routing to Default controller. * Simplify Default controllers
I found the
Defaultcontroller useful and thought it'd be good to mention it in the routing documentation. This PR does that, along with some other minor documentation fixes.