Tip: Automatically annotate rails views
PROBLEM: When your application grows, and your views become more complex, it can be hard to know where an element on an HTML page is rendered from.
There’s a simple solution!
Just add this line:
# config/environments/development.rb
# Annotate rendered view with file names.
-- # config.action_view.annotate_rendered_view_with_filenames = true
++ config.action_view.annotate_rendered_view_with_filenames = true
Works for:
- templates
- partials
- ViewComponents !!!
Resources:
Did you like this article? Did it save you some time?