codeparkhouston/rails-girls-houston-reference — pull request #1 by hahahana (2014-02-19 15:58:43+00:00)
Title: Implement user tagging via '[ ]' in posts

Hey @swifthand, is this along the lines of what you were thinking? I tried to make it as straightforward as possible, so instead of using @name, I thought it would be easier to use [name] so we can isolate the name quickly using splits and then a simple gsub if we found the user. It's obviously not the best Ruby or the most robust method, but I wanted to use the most expressive built in methods. I also wanted to return at the end of the method, not the result of an if/else block, and no mutation methods.