codeparkhouston/rails-girls-houston-reference — pull request #2 by hahahana (2014-02-19 16:03:02+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 I wanted to avoid using mutation methods, while restricting the number of variables.

This is NOT meant to be merged, it should stay as a branch. I also made a new pull request because I wanted the branch names to be "feature/#{name}".