Implement Router decorator for polymorphic resource routing.