Today I Learned

hashrocket A Hashrocket project

Read Commented Notes

Want to resolve all those # TODO, # FIXME, and # OPTIMIZE comments in your Rails app? Good call, we don't want these getting too comfortable.

To demonstrate, push a note into a new file app/models/foo.rb:

$ echo '# TODO DRY this up!' >> app/models/foo.rb

Then run rake notes:

$ rake notes
  * [1] [TODO] DRY this up!

rake -T | grep notes shows our options, including flags to filter results. We also get rake notes:custom, to find a custom note tag:

$ echo '# HACK woah.' >> app/models/foo.rb
$ rake notes:custom ANNOTATION=HACK
  * [2] woah.
See More #ruby TILs
Looking for help? Each developer at Hashrocket has years of experience working with Ruby applications of all types and sizes. We're an active presence at Ruby conferences, have written some of the most popular gems, and have worked on many of the web's Ruby on Rails success stories. Contact us today to talk about your Ruby project.