Commit eb92813757d8ec14819ddbab6efae7e7cdd403e6
1 parent
682f62fd
Exists in
master
and in
4 other branches
Move emoji auto-complete helper to ApplicationHelper
Showing
3 changed files
with
6 additions
and
16 deletions
Show diff stats
app/helpers/application_helper.rb
| ... | ... | @@ -98,6 +98,12 @@ module ApplicationHelper |
| 98 | 98 | [projects, default_nav, project_nav].flatten.to_json |
| 99 | 99 | end |
| 100 | 100 | |
| 101 | + def emoji_autocomplete_source | |
| 102 | + # should be an array of strings | |
| 103 | + # so to_s can be called, because it is sufficient and to_json is too slow | |
| 104 | + Emoji::NAMES.to_s | |
| 105 | + end | |
| 106 | + | |
| 101 | 107 | def ldap_enable? |
| 102 | 108 | Devise.omniauth_providers.include?(:ldap) |
| 103 | 109 | end | ... | ... |
app/helpers/notes_helper.rb
spec/helpers/notes_helper_spec.rb