We write about Ruby on Rails, React.js, React Native, remote work, open source, engineering and design.
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.