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 authored and Dome-GER committed Oct 2, 2024
1 parent 9dbd5ed commit e86bf64
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 @@ -114,4 +114,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 e86bf64

Please sign in to comment.