DEV: Deprecate Category#url_with_id in favor of Category#url (#9972)

This commit is contained in:
Dan Ungureanu
2020-06-18 11:32:14 +03:00
committed by GitHub
parent 62faa0f5fe
commit d21a08c284
10 changed files with 21 additions and 45 deletions

View File

@@ -9,7 +9,7 @@ class CategoryHashtagsController < ApplicationController
ids = category_slugs.map { |category_slug| Category.query_from_hashtag_slug(category_slug).try(:id) }
valid_categories = Category.secured(guardian).where(id: ids).map do |category|
{ slug: category.hashtag_slug, url: category.url_with_id }
{ slug: category.hashtag_slug, url: category.url }
end.compact
render json: { valid: valid_categories }