Class: Talkie::MentionsController

Inherits:
TalkieController show all
Defined in:
app/controllers/talkie/mentions_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



5
6
7
8
9
10
11
12
# File 'app/controllers/talkie/mentions_controller.rb', line 5

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