Commit 7bb378b3 authored by Annabel Dunstone's avatar Annabel Dunstone

Create EmojisController

parent b80df087
......@@ -19,7 +19,7 @@ class @AwardsHandler
$(".emoji-menu").show()
$("#emoji_search").focus()
else
$.get "/emoji_menu", (response) ->
$.get "/emojis", (response) ->
$(".add-award").after response
$(".emoji-menu").show()
$("#emoji_search").focus()
......
......@@ -24,10 +24,6 @@ class AutocompleteController < ApplicationController
render json: @user, only: [:name, :username, :id], methods: [:avatar_url]
end
def emoji_menu
render 'shared/emoji_menu', layout: false
end
private
def find_users
......
class EmojisController < ApplicationController
def index
render :index, layout: false
end
end
......@@ -42,8 +42,9 @@ Rails.application.routes.draw do
# Autocomplete
get '/autocomplete/users' => 'autocomplete#users'
get '/autocomplete/users/:id' => 'autocomplete#user'
get '/emoji_menu' => 'autocomplete#emoji_menu'
# Emojis
resources :emojis, only: :index
# Search
get 'search' => 'search#show'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment