BUGFIX: downcase slugs
This commit is contained in:
parent
c87ed6b02a
commit
39b5539ba8
|
@ -43,7 +43,7 @@ class TopicsController < ApplicationController
|
||||||
begin
|
begin
|
||||||
@topic_view = TopicView.new(params[:id] || params[:topic_id], current_user, opts)
|
@topic_view = TopicView.new(params[:id] || params[:topic_id], current_user, opts)
|
||||||
rescue Discourse::NotFound
|
rescue Discourse::NotFound
|
||||||
topic = Topic.find_by(slug: params[:id]) if params[:id]
|
topic = Topic.find_by(slug: params[:id].downcase) if params[:id]
|
||||||
raise Discourse::NotFound unless topic
|
raise Discourse::NotFound unless topic
|
||||||
return redirect_to(topic.relative_url)
|
return redirect_to(topic.relative_url)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue