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

Create EmojisController

parent b80df087
...@@ -19,7 +19,7 @@ class @AwardsHandler ...@@ -19,7 +19,7 @@ class @AwardsHandler
$(".emoji-menu").show() $(".emoji-menu").show()
$("#emoji_search").focus() $("#emoji_search").focus()
else else
$.get "/emoji_menu", (response) -> $.get "/emojis", (response) ->
$(".add-award").after response $(".add-award").after response
$(".emoji-menu").show() $(".emoji-menu").show()
$("#emoji_search").focus() $("#emoji_search").focus()
......
...@@ -24,10 +24,6 @@ class AutocompleteController < ApplicationController ...@@ -24,10 +24,6 @@ class AutocompleteController < ApplicationController
render json: @user, only: [:name, :username, :id], methods: [:avatar_url] render json: @user, only: [:name, :username, :id], methods: [:avatar_url]
end end
def emoji_menu
render 'shared/emoji_menu', layout: false
end
private private
def find_users def find_users
......
class EmojisController < ApplicationController
def index
render :index, layout: false
end
end
...@@ -42,8 +42,9 @@ Rails.application.routes.draw do ...@@ -42,8 +42,9 @@ Rails.application.routes.draw do
# Autocomplete # Autocomplete
get '/autocomplete/users' => 'autocomplete#users' get '/autocomplete/users' => 'autocomplete#users'
get '/autocomplete/users/:id' => 'autocomplete#user' get '/autocomplete/users/:id' => 'autocomplete#user'
get '/emoji_menu' => 'autocomplete#emoji_menu'
# Emojis
resources :emojis, only: :index
# Search # Search
get 'search' => 'search#show' 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