Skip to content

Commit b292878

Browse files
committed
Show all attributes when inspecting an object in production
Otherwise, only the `id` is shown by default (in contrast to `full_inspect`). This behavior has changed with Rails 7.2, and previously showed all information by default. Since we often use `inspect` within the application to get details about unexpected errors, we want to keep the previous behavior.
1 parent 2ccfb17 commit b292878

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

config/environments/production.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,8 @@
113113
# ]
114114
# Skip DNS rebinding protection for the default health check endpoint.
115115
# config.host_authorization = { exclude: ->(request) { request.path == "/up" } }
116+
117+
# Show all attributes when inspecting an object.
118+
# Otherwise, only the `id` is shown by default (in contrast to `#full_inspect`).
119+
config.active_record.attributes_for_inspect = :all
116120
end

0 commit comments

Comments
 (0)