Skip to content

Rodrigo Urubatan – About Code

Helping ruby developers to use the best tools for each job so they can solve hard problems, with less bugs and have more free time.

Menu
  • Home
  • My last presentations
  • About
  • Privacy Policy
Menu

Quick tips that help: rails notes

Posted on 2023-01-052023-01-05 by Rodrigo Urubatan

This is actually not new, the command is there for a long time, but it is one of those things that help and you keep forgetting about.

It works by searching your code for comments with specific keywords, the default is searching for FIXME, OPTIMIZE and TODO.

You can add more tags either by using the “–annotations” parameter or by registering the tags in your rails config

config.annotations.register_tags("DEPRECATEME", "TESTME")

The output is pretty simple and yet helpful, for example this is the output of one of my projects:

$rails notes
app/controllers/some_controller_with_domains.rb:
  * [ 67] [FIXME] need to check allowed domains
  * [ 86] [FIXME] need to check allowed domains

app/controllers/search_controller.rb:
  * [ 71] [FIXME] ugly hack for exact match
  * [190] [FIXME] ugly hack for exact match

app/webpacker/javascript/core/components/SomeJavascriptFile.js:
  * [ 33] [TODO] Remove from collection if status no longer matches search
  * [167] [TODO] Not implemented

app/webpacker/javascript/core/components/SomeOtherJavascriptFIle.js:
  * [ 38] [FIXME] not actually properly memoized

app/webpacker/javascript/core/components/JavascriptWithWeirdness.js:
  * [107] [FIXME] Weirdness on first update

Leave a Reply Cancel reply

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

Recent posts

  • Quick tips that help: rails notes
  • Ruby 3.2.0 released with WASI, YJIT, RegExp improvements, …
  • Rubyconf Thailand quick summary and slides
  • Testing download contents with Cucumber+Capybara and chromedriver
  • When Kubernetes is not the right choice?

Comments

  1. When Kubernetes is not the right choice? | Rodrigo Urubatan - About Code on Rails from “zero” to kubernetes – first pod
  2. When Kubernetes is not the right choice? | Rodrigo Urubatan - About Code on How to use docker to have an uniform development environment for your rails project
  3. Rails from "zero" to kubernetes – ingress reverse proxy | Rodrigo Urubatan - About Code on Rails from “zero” to kubernetes – a service to access your pod
  4. Rails from "zero" to kubernetes – horizontal autoscaling | Rodrigo Urubatan - About Code on Rails from “zero” to kubernetes – a service to access your pod
  5. Jeronimo on 6 Lessons From CrossFit That will help your developer career (Or any other career in the matter of fact)

Arquives

  • January 2023
  • December 2022
  • June 2021
  • March 2020
  • January 2020
  • July 2019
  • June 2019
  • May 2019
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • June 2018
  • May 2018
  • February 2018
  • January 2018
  • November 2017
  • August 2015
  • August 2014
  • July 2014
  • August 2007

Categories

  • articles
  • cfp
  • firebase
  • gems
  • git
  • opinion
  • presentations
  • projects
  • rails6
  • ruby
  • Sem categoria
  • server-api
  • Uncategorized
© 2023 Rodrigo Urubatan – About Code | Powered by Minimalist Blog WordPress Theme