Skip to content

Commit 64370c9

Browse files
authored
Merge pull request rails#50436 from adrianthedev/refactor/enable-view-annotations-in-development
refactor: default annotate_rendered_view_with_filenames to true in development
2 parents 1a4f40f + 475bb4b commit 64370c9

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

railties/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
* Set `config.action_view.annotate_rendered_view_with_filenames` to `true` in the
2+
development environment.
3+
4+
*Adrian Marin*
5+
16
* Support `BACKTRACE` ENV variable to turn off backtrace cleaning.
27

38
Useful for debugging framework code:

railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Rails.application.configure do
7878
# config.i18n.raise_on_missing_translations = true
7979

8080
# Annotate rendered view with file names.
81-
# config.action_view.annotate_rendered_view_with_filenames = true
81+
config.action_view.annotate_rendered_view_with_filenames = true
8282

8383
<%- unless skip_action_cable? -%>
8484
# Uncomment if you wish to allow Action Cable access from any origin.

railties/test/isolation/abstract_unit.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ def build_app(options = {})
143143
config.action_controller.allow_forgery_protection = false
144144
RUBY
145145

146+
add_to_env_config :development, "config.action_view.annotate_rendered_view_with_filenames = false"
147+
146148
remove_from_env_config("development", "config.generators.apply_rubocop_autocorrect_after_generate!")
147149
end
148150

0 commit comments

Comments
 (0)