This commit is contained in:
John Bintz 2013-04-03 07:29:15 -04:00
parent ca7111edac
commit 20e3f4ad51

View File

@ -51,7 +51,7 @@ class SlugInput < Formtastic::Inputs::StringInput
var setSlug = function(text) { var setSlug = function(text) {
var i, k; var i, k;
var originalSlug = text.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/, ''); var originalSlug = text.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/(^-|-$)/, '');
var newSlug = originalSlug; var newSlug = originalSlug;
var index = 0; var index = 0;