0
0
Fork 0

Feature: Unlisted custom emojis (#5485)

This commit is contained in:
nullkal 2017-10-27 23:11:30 +09:00 committed by Eugen Rochko
parent 0cb329f63a
commit 781105293c
9 changed files with 32 additions and 6 deletions

View file

@ -22,6 +22,14 @@ module Admin
end
end
def update
if @custom_emoji.update(resource_params)
redirect_to admin_custom_emojis_path, notice: I18n.t('admin.custom_emojis.updated_msg')
else
redirect_to admin_custom_emojis_path, notice: I18n.t('admin.custom_emojis.update_failed_msg')
end
end
def destroy
@custom_emoji.destroy
redirect_to admin_custom_emojis_path, notice: I18n.t('admin.custom_emojis.destroyed_msg')
@ -56,7 +64,7 @@ module Admin
end
def resource_params
params.require(:custom_emoji).permit(:shortcode, :image)
params.require(:custom_emoji).permit(:shortcode, :image, :visible_in_picker)
end
def filtered_custom_emojis