Skip to content
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

Remove conditional from user partial in favor of User#display_name #3380

Merged
merged 1 commit into from
Nov 7, 2018

Conversation

no-reply
Copy link
Contributor

@no-reply no-reply commented Nov 5, 2018

User#name already handles this logic in a cleanly overridable way. It's also a
bit nicer since it avoids repeated access and comparison on #name and #user_key.

The goal is: display a nice displayable name when its available; display the
#user_key as a fall back.

This should behave as a straight refactor except when #display_name is customized. The assumption is that in this case, using #display_name is desirable.

@samvera/hyrax-code-reviewers

`User#name` already handles this logic in a cleanly overridable way. It's also a
bit nicer since it avoids repeated access and comparison on `#name` and `#user_key`.

The goal is: display a nice displayable name when its available; display the
`#user_key` as a fall back.
@cjcolvar cjcolvar merged commit 30b9abe into master Nov 7, 2018
@cjcolvar cjcolvar deleted the user-view-conditional branch November 7, 2018 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants