Permalink
Browse files

added toLowerCase() option

  • Loading branch information...
1 parent 2d3c46e commit 8d597b39457edd80f704817cff0e03b53dc3f21d @sagivo committed Jun 10, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/helpers.js
View
2 lib/helpers.js
@@ -234,7 +234,7 @@ HelperSet.prototype.link_to = HelperSet.prototype.linkTo;
*/
HelperSet.prototype.linkToIfNotCurrent = function linkTo(text, url, params) {
if (url && url[0]=='/') url = url.substring(1); //trim first '/' if exists
- return (url == _url.parse( this.controller.request.url ).pathname.substring(1) ) ? text : HelperSet.prototype.link_to(text, url, params) ;
+ return (url.toLowerCase() == _url.parse( this.controller.request.url ).pathname.substring(1).toLowerCase() ) ? text : HelperSet.prototype.link_to(text, url, params) ;
};
HelperSet.prototype.link_to_if_not_current = HelperSet.prototype.linkToIfNotCurrent;

0 comments on commit 8d597b3

Please sign in to comment.