在迁移之前,网站完全没问题。现在我们已经迁移到一个新的服务器,网站开始显示一些链接的这种错误:http: //babybum.proj.dev.doo.is/sao-paulo/planta
这是公平控制器中“区域”的定义
def area
@area_name = BB_MENU_AREAS_SLUG.select {|k, v| v == params[:area]}.keys.first
if @area_name
@area = Snippet.find_by_identifier([params[:fair_location], @area_name.to_s].join('-'))
else
redirect_to root_path
end
end
BB_AREAS_SLUG 的片段
BB_AREAS = {
:about => {:link => "quem somos", :slug => "quem-somos"},
:expositors => {:link => "expositores",:slug => "expositores"},
:map => {:link => "planta", :slug => "planta"},
:activities => {:link => "atividades",:slug => "atividades"},
:address => {:link => "como chegar",:slug => "como-chegar"},
:support => {:link => "apoio", :slug => "apoio"},
:optin => {:link => "cadastro",:slug => "cadastro"},
:how_expositors => {:link => "como expor",:slug => "como-expor"},
:press => {:link => "imprensa",:slug => "imprensa"},
:contact => {:link => "contato",:slug => "contato"},
}
BB_MENU_AREAS = BB_AREAS.each_with_object({}) { |(k, v), h| h[k] = v[:link]}
BB_MENU_AREAS_SLUG = BB_AREAS.each_with_object({}) { |(k, v), h| h[k] = v[:slug]}
有人可以帮助我吗?
谢谢