Support trailing `/` when retrieving comment counts.

This commit is contained in:
Robin Ward 2014-03-20 15:22:49 -04:00
parent b0a130db86
commit a4daafa026
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ class EmbedController < ApplicationController
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)
by_url = {}