trends_controller.rb 274 B

123456789101112131415
  1. # frozen_string_literal: true
  2. class Api::V1::TrendsController < Api::BaseController
  3. before_action :set_tags
  4. def index
  5. render json: @tags, each_serializer: REST::TagSerializer
  6. end
  7. private
  8. def set_tags
  9. @tags = TrendingTags.get(limit_param(10))
  10. end
  11. end