Fix for invalid slugs, force trailing slash

This commit is contained in:
Godwin
2014-07-11 21:15:23 -06:00
parent db621f244b
commit 6fb392fa37
4 changed files with 12 additions and 9 deletions
+1 -1
View File
@@ -119,7 +119,7 @@ namespace :migrate do
{
:id => id,
:name => object[:title],
:slug => object[:path].gsub(/^.*\/(.*)$/, '\1'),
:slug => object[:path].gsub(/^.*\/(.*)$/, '\1').gsub(/[\.\#\?\!]/, ''),
:email_address => object[:email] && object[:email].first ? object[:email]['und'][0]['url'] : nil,
:url => object[:field_website] && object[:field_website].first ? object[:field_website]['und'][0]['url'] : nil,
:year_founded => object[:field_year_founded] && object[:field_year_founded].first ? object[:field_year_founded]['und'][0]['value'] : nil,