Skip to content

Instantly share code, notes, and snippets.

@jeremydmiller
Created January 11, 2011 00:07
Show Gist options
  • Save jeremydmiller/773750 to your computer and use it in GitHub Desktop.
Save jeremydmiller/773750 to your computer and use it in GitHub Desktop.
public class HelloWorldFubuRegistry : FubuRegistry
{
public HelloWorldFubuRegistry()
{
IncludeDiagnostics(true);
HomeIs<HomeInputModel>();
Actions
.IncludeClassesSuffixedWithController();
Routes
.IgnoreControllerNamespaceEntirely()
.IgnoreMethodSuffix("Command")
.IgnoreMethodSuffix("Query")
.ConstrainToHttpMethod(action => action.Method
.Name.EndsWith("Command"), "POST")
.ConstrainToHttpMethod(action => action.Method
.Name.StartsWith("Query"), "GET");
Views.TryToAttachWithDefaultConventions();
HtmlConvention<SampleHtmlConventions>();
RegisterPartials(x => x.For<Product>().Use<ProductPartial>());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment