-
Notifications
You must be signed in to change notification settings - Fork 21.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
attributes_for_inspect
config doesn't seem to work
#53665
Comments
attributes_for_inspect config
doesn't seem to workattributes_for_inspect
config doesn't seem to work
@skipkayhil thanks for the response. That reference doesn't help in anyway I'm afraid. Here's what I have in my Rails.application.configure do
config.active_record.attributes_for_inspect = [ :id ] And here's some output in my dev console:
I expect More over, if I explicitly set the
|
@siaw23 In the console we always show all attributes.
|
Closing since apparently that's desired behavior. |
Steps to reproduce
Expected behavior
I expect to see just the
id
andcreated_at
attributes when I doPost.first.inspect
Actual behavior
In my console, I see ALL the attributes,
config.active_record.attributes_for_inspect
doesn't respect the attributes I pass to it. In the reproduction script above however, something different happens, it shows ONLY theid
without thecreated_at
.System configuration
Rails version: "8.0.0"
Ruby version: "3.3.0"
cc: @p8 @andrewn617
The text was updated successfully, but these errors were encountered: