Support trailing `/` when retrieving comment counts.
This commit is contained in:
parent
b0a130db86
commit
a4daafa026
|
@ -28,7 +28,7 @@ class EmbedController < ApplicationController
|
||||||
|
|
||||||
def count
|
def count
|
||||||
|
|
||||||
urls = params[:embed_url].map {|u| u.sub(/#discourse-comments$/, '') }
|
urls = params[:embed_url].map {|u| u.sub(/#discourse-comments$/, '').sub(/\/$/, '') }
|
||||||
topic_embeds = TopicEmbed.where(embed_url: urls).includes(:topic).references(:topic)
|
topic_embeds = TopicEmbed.where(embed_url: urls).includes(:topic).references(:topic)
|
||||||
|
|
||||||
by_url = {}
|
by_url = {}
|
||||||
|
|
Loading…
Reference in New Issue