Create EmojisController

This commit is contained in:
Annabel Dunstone 2016-02-22 20:16:00 -06:00
parent b80df08735
commit 7bb378b33d
5 changed files with 8 additions and 6 deletions

View file

@ -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()

View file

@ -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

View file

@ -0,0 +1,5 @@
class EmojisController < ApplicationController
def index
render :index, layout: false
end
end

View file

@ -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'