mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
14 lines
435 B
Ruby
14 lines
435 B
Ruby
class ThreddedProxyController < ApplicationController
|
|
def topic
|
|
topic = Thredded::Topic.find_by(slug: params[:slug])
|
|
if topic.present?
|
|
redirect_to thredded.messageboard_topic_path(
|
|
messageboard_id: topic.messageboard_id,
|
|
id: topic.id
|
|
)
|
|
else
|
|
redirect_back(fallback_location: root_path, notice: "The link you tried to visit is invalid or no longer exists.")
|
|
end
|
|
end
|
|
end
|