rikkimax/Cmsed — pull request #4 by katyukha (2014-04-09 08:49:18+00:00)
Title: Using diet templates by routes caused HTTP 404 error

It may be bad solution, but seems to be working.

When using routes like:

```d
module routes.blog;

import cmsed.base;

class Home : OORoute {
@RouteFunction(RouteType.Get, "/test/", "index")
bool test() {return true;}
}
```

Program compiles fine but diet template 'index' was not compiled, and when trying to access URL '/test/'
only error "Error 404: Not Found" was displayed

The reason os such bechavior was in function *useRenderOptionalFunc*. It results *false* even if method's
return type is bool. One more strange thing - if move this function to module *parser.d* then it works fine.
I had found that this function is used only in two places, and replace it with function's internal expression. There same checks done for Json for example but without separate function. So it seems to not bad solution.

Next error was if function *handleFirstExecute*. There was not *new* placed before construction of *RouteInformation*, and this function was declared as *pure*, but at leas *compileDietFile* is not pure.

Now it seems to be working, but diet templates compiled two times.

What about *handleFirstExecute*? Now it only compiles Diet template. What it may do in future?