implement Application.resource() for defining resource routes