Last Updated on November 30, 2019 by Christopher G Mendla
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 above.app/controllers/constructions_controller.rb: * [ 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. https://github.com/amatsuda/kaminari/issues/811app/controllers/failed_logins_controller.rb: * [ 6] [TODO] – add alert system