Create EmojisController
This commit is contained in:
parent
b80df08735
commit
7bb378b33d
5 changed files with 8 additions and 6 deletions
|
@ -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
|
||||
|
|
5
app/controllers/emojis_controller.rb
Normal file
5
app/controllers/emojis_controller.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
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'
|
||||
|
|
Loading…
Reference in a new issue