mentioning

This commit is contained in:
jomo
2014-07-06 04:57:51 +02:00
parent 2b1e8acee3
commit b1d797ce06
21 changed files with 326 additions and 60 deletions

View File

@@ -1,6 +1,14 @@
module UsersHelper
require "open-uri"
def mentions(content)
words = content.scan(/@[a-zA-Z0-9_]{1,16}/)
words.map! do |w|
w[0] = ""
w
end
User.where(ign: words).uniq!
end
def get_youtube(yt_name)
yt = {channel: yt_name}