Ruby, Ruby on Rails

Rake:notes FTW!

I just found a really cool feature in Rails, can’t believe I didn’t know about it before.

Apparently you can add comments like this in your Rails app

    def uncompleted_method
      # TODO complete this method
    end

And if you run `rake:notes` in your terminal, it will list down all the TODO comments like so

rake-notes-todo

You can also use `optimize` and `fixme` with rake:notes.

    def need_to_fix
      # FIXME fix this quickly
    end

    def optimize_this
      # OPTIMIZE this is way too slow
    end

Running rake:notes will give you:

rake-notes-todo-2

This is a really useful technique to maintain a running todo list/ reminder system in your Rails app

Advertisements

One thought on “Rake:notes FTW!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s