Closed kortirso closed 6 years ago
I found the solution.
Just put this gem helper methods in messages controller. http://textup.fr/184548YN
Has you can see i use method 'content_with_emoji(message.content)' in create method. And under private, all method are in gem helper... Just copy past all method under private except first ('message_params'), it's my params method.
if you want only gem helper: http://textup.fr/184541W8 But you have to patch line 68 (url = image_tag("emoji/#{img[:name]}.png")[/img.?src="(.?)"/i, 1]) to (url = ActionController::Base.helpers.image_tag("emoji/#{img[:name]}.png")[/img.?src="(.?)"/i, 1])) Sorry for my english.
Good day. I send message block with action cable in rails 5 but message looks like 'message 😁'. How can I build correct block, transform 😁 into
in model method?