twitter.bootstrap.mvc
twitter.bootstrap.mvc copied to clipboard
Bad url for "Home" controller actions
"NavigationRouteConfigurationExtensions" generate incorrect url when a action in HomeController (different from index) is added.
File NavigationRouteConfigurationExtensions, method CreateUrl.
Patch:
public static string CreateUrl(string actionName, string controllerName) { if (controllerName.Equals("home", StringComparison.CurrentCultureIgnoreCase)) { if (actionName.Equals("index", StringComparison.CurrentCultureIgnoreCase)) { return ""; } //else //{ // return actionName.ToLower(); <-- Incorrect url for home controller action //} }
return controllerName.ToLower() + "/" + actionName.ToLower();
}
I dont know why I changed this. :) I will update the unit test and push a change out
Eric Hexter
blog | http://Hex.LosTechies.com info | http://www.linkedin.com/in/erichexter
On Thu, Jan 31, 2013 at 9:34 AM, Sergio [email protected] wrote:
"NavigationRouteConfigurationExtensions" generate incorrect url when a action in HomeController (different from index) is added.
File NavigationRouteConfigurationExtensions, method CreateUrl.
Patch:
public static string CreateUrl(string actionName, string controllerName) { if (controllerName.Equals("home", StringComparison.CurrentCultureIgnoreCase)) { if (actionName.Equals("index", StringComparison.CurrentCultureIgnoreCase)) { return ""; } //else //{ // return actionName.ToLower(); <-- Incorrect url for home controller action //} }
return controllerName.ToLower() + "/" + actionName.ToLower(); }
— Reply to this email directly or view it on GitHubhttps://github.com/erichexter/twitter.bootstrap.mvc/issues/64.
Hi
Has this issue been fixed? I know when I use action link and include the the controller name it shows the url with ?length5