Sha256: e73780832587ea50580827acb5c849e1e6d962dfbbea0becf8c824df2d66c040
Contents?: true
Size: 521 Bytes
Versions: 10
Compression:
Stored size: 521 Bytes
Contents
# frozen_string_literal: true module Talkie class MentionsController < TalkieController def index if query.size < 2 render json: { error: 'Query string is too short (minimum 2 characters)' }, status: :unprocessable_entity else render json: MentioneesBlueprint.render(mentionees) end end private def query @query ||= params[:q].to_s end def mentionees @mentionees ||= current_user.class.mentionees(query) end end end
Version data entries
10 entries across 10 versions & 1 rubygems