Sha256: 72fc98f9df2cc39974bcd26319316f8d912de84e9d5590114c1239ba27dcf369
Contents?: true
Size: 345 Bytes
Versions: 1
Compression:
Stored size: 345 Bytes
Contents
module EmojiHelper def emojify(content) content.to_str.gsub(/:([a-z0-9\+\-_]+):/) do |match| if Emoji.all.map(&:name).include?($1) "<img alt=\"#{$1}\" height=\"20\" width=\"20\" src=\"#{image_url("emoji/#{$1}.png")}\" class=\"emoji\" />" else match end end.html_safe if content.present? end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
houston-core-0.5.0.beta1 | app/helpers/emoji_helper.rb |