This blog is part of our Rails 6.1 series.
Rails 6.1 makes it easier to debug rendered HTML by adding the name of each template used.
Add the following line in
development.rb file to enable this feature.
config.action_view.annotate_rendered_view_with_filenames = true
Now the rendered HTML will contain comment indicating the beginning and end of each template.
Here is an example.
In the image
we can see the
for each of the templates.
It helps a lot
webpages to find out
Check out the
for more details on this.