Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@p8
Copy link
Member

@p8 p8 commented Oct 28, 2024

Motivation / Background

When ActiveRecord::Core.attributes_for_inspect is set to [:id] in a non-production environment, #inspect will only show the id attribute, while it will show all attributes in production.

If .attributes_for_inspect is set to :all for production console, we probably want this behaviour in all environments.

Follow up to #52801

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one change. Unrelated changes should be opened in separate PRs.
  • Commit message has a detailed description of what changed and why. If this PR fixes a related issue include it in the commit message. Ex: [Fix #issue-number]
  • Tests are added or updated if you fix a bug or add a feature.
  • CHANGELOG files are updated for the changed libraries if there is a behavior change or additional feature. Minor bug fixes and documentation changes should not be included.

@p8 p8 changed the title Always show all attributes in console Always show all attributes in the console Oct 28, 2024
If this should be enabled for production console, we probably want all
attributes in all environments.
@p8 p8 force-pushed the activerecord/show-all-attributes-in-console branch from 566c970 to 19fa988 Compare October 28, 2024 19:21
@rafaelfranca rafaelfranca merged commit d20f58b into rails:main Oct 29, 2024
rafaelfranca added a commit that referenced this pull request Oct 29, 2024
…-console

Always show all attributes in the console
rafaelfranca added a commit that referenced this pull request Oct 29, 2024
…-console

Always show all attributes in the console
@p8 p8 deleted the activerecord/show-all-attributes-in-console branch October 30, 2024 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants