def mentions
      security_transgression_unless @thread.can_be_read_by?(@user) && Commontator.mentions_enabled
      query = params[:q].to_s

      if query.size < 3
        render json: { errors: ['Query string is too short (minimum 3 characters)'] },
               status: :unprocessable_entity
      else
        render json: serialized_mentions(query)
      end
    end
def mentions
      security_transgression_unless @thread.can_be_read_by?(@user) && Commontator.mentions_enabled
      query = params[:q].to_s

      if query.size < 3
        render json: { errors: ['Query string is too short (minimum 3 characters)'] },
               status: :unprocessable_entity
      else
        render json: serialized_mentions(query)
      end
    end
GET /threads/1/mentions.json