-
Notifications
You must be signed in to change notification settings - Fork 900
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
introduce all_attribute_names #23324
Conversation
def all_attribute_names | ||
attribute_names | (try(:attribute_aliases)&.keys || []) | ||
end | ||
|
||
# @return Array[String] attribute names that can be advertised in the api and reporting | ||
# Other attributes are accessible, they are just no longer in our public api (or never were) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this sentence mean? Can you provide an example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original text says "non-hidden attributes"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, let's merge it and if you think of a better way to describe it, we can edit it later. I don't have a better suggestion.
Before
attribute_alias
values do not show up inattribute_names
, so they are not discoverable.After
all_attribute_names
show attributes and aliases and can be used for api and automate methods.See Also