mentionable gemã§ç°¡åã«mentionãå®è£ ã§ãã¾ããï¼ããããã㤠â @komagataï¼ komagata/mentionable ã¤ã³ã¹ãã¼ã« gem 'mentionable' $ bundle install 使ãæ¹ app/models/comment.rb: class Comment mentionable_as :body def after_save_mention(new_mentions) p new_mentions # => ["@komagata", "@machida"] end end Commentã¢ãã«ã®bodyã«mentionãå«ã¾ããæç« ãä¿åãããå ´åãmentionable_asã§ãã®ã«ã©ã ãæå®ãããããã©ã«ãã§after_save_mentionã¡ã½ãããå¼ã°ããã®ã§å®è£ ãã¦ç½®ãã°OKã ãã®ã«ã©ã ã«ã¡ã³ã·ã§ã³ãå«ã¾ãã¦ãã
{{#tags}}- {{label}}
{{/tags}}