Here you can find the source of dasherize()
String.prototype.dasherize = function() { return this.gsub(/_/,'-'); };
String.prototype.dasherize = function() { return this.replace(/_/g, "-"); };
String.prototype.dasherize = function() { return this.replace(/_/g, "-"); };
String.prototype.dasherize = function() { return this.replace(/_/g, '-'); };
String.prototype.dasherize = function() { return this.replace(/_/g, "-"); };
String.prototype.dasherize = function() { return this.replace(/_/g, '-'); };
String.prototype.toDash = function(){ return this.replace(/([A-Z])/g, function($1){return "-"+$1.toLowerCase();}); };