Skip to content

Commit

Permalink
Fix for generate node path. Strip string last to remove all trailing
Browse files Browse the repository at this point in the history
spaces.
  • Loading branch information
Doug Youch committed Aug 6, 2010
1 parent 926e796 commit a88a69a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/site_node.rb
Expand Up @@ -131,7 +131,7 @@ def add_subpage(title,type = 'P')
end

def self.generate_node_path(title)
title.underscore.strip.gsub(/[ _]+/, '-').gsub(/[^a-z0-9.\-]/, '')
title.underscore.gsub(/[^a-z0-9 _\-]/, '').strip.gsub(/[ _]+/, '-')
end

def new_revision
Expand Down

0 comments on commit a88a69a

Please sign in to comment.