Thoughts, information and reflections about technology

Use Rake Notes instead of Git Grep to get a list of notes in your rails project

When you create a Rails project, it is helpful to put notes in the project. The notes can look like the following in your controllers:

# TODO change the alignment of the column

    # FIXME – User password retrieval is not working as expected
# OPTIMIZE Add indexes

Or, in the case of views, use the following format

  <%# TODO style the product column %>

One important thing to note is that TODO etc need to be in all caps. These notes are in a format that GIT understands. However, I have found it is easier to access them using RAKE NOTES.

You can then get a list of your notes by running RAKE NOTES at the root of your project.

The resulting output will be similar to the following

app/controllers/application_controller.rb: * [  9] [TODO] – notify user if file is over the set size.  * [ 17] [TODO] Make sure this is the right place for this  * [ 18] [TODO] make sure that the session also works if the server is restarted.  * [ 46] [TODO] hardwired  * [ 55] [TODO] check this. Is render show correct?  * [116] [TODO] see if this can use the same methods as the notifies under construction (Above)  * [123] [TODO] – create the notification record when the DCR is created  * [126] [TODO] the lines below seem to duplicate the lines in labs_controller/show  * [130] [FIXME] – set a variable to the id based on the where  * [ 17] [TODO] hardwired this is for the mockup. Logic needs to be added to pull the real ecr  * [ 21] [TODO] hardwired for testing – It will need to be dynamic  * [ 67] [TODO] this is for the mockup. Logic needs to be added to pull the real ecr  * [109] [TODO] this is for the mockup. Logic needs to be added to pull the real ecrapp/controllers/ecr_olds_controller.rb:  * [ 28] [FIXME] – Pagination is not working with the external model.  * [  6] [TODO] – add alert system

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact me
Amazon Disclosure

We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to and affiliated sites.