Skip to content

Commit

Permalink
Show all attributes when inspecting an object in production
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
MrSerth committed Oct 2, 2024
1 parent f89c692 commit 4dc4c4d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,8 @@
# ]
# Skip DNS rebinding protection for the default health check endpoint.
# config.host_authorization = { exclude: ->(request) { request.path == "/up" } }

# Show all attributes when inspecting an object.
# Otherwise, only the `id` is shown by default (in contrast to `#full_inspect`).
config.active_record.attributes_for_inspect = :all
end

0 comments on commit 4dc4c4d

Please sign in to comment.