FIX: multisite migration fails when adding a new site because SiteSetting.slug_generation_method is nil

This commit is contained in:
Neil Lalonde 2015-05-05 18:50:54 -04:00
parent 0f53fc8328
commit 2139a6208b

View File

@ -3,7 +3,7 @@
module Slug
def self.for(string, default = 'topic')
slug = case SiteSetting.slug_generation_method.to_sym
slug = case (SiteSetting.slug_generation_method || :ascii).to_sym
when :ascii then self.ascii_generator(string)
when :encoded then self.encoded_generator(string)
when :none then self.none_generator(string)