I'm currently learning Rails and it's awesome but I really like Symfony's routing system. In Symfony it is possible to define routes directly in Controller with annotations. For example:
/**
* @Route("/blog")
*/
class PostController extends Controller
{
/**
* @Route("/{id}")
*/
public function showAction($id)
{
}
}
This means that /blog/5 will route to PostController#showAction. I like this approach because routes are defined directly before your action method and, from my point of view, it makes more sense than defining everything in a single file.
Is there something similar for Rails?
Thank you!