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

🧹 Avoid #present? in non-Rails situations #2055

Merged
merged 1 commit into from
Dec 15, 2023

Conversation

jeremyf
Copy link
Contributor

@jeremyf jeremyf commented Dec 14, 2023

Rails provides Object#present?, which is a method that is not
generally available in Ruby. However in the changed context, the
scripts do not have access to Rails methods.

By using this adjusted approach we favor baseline Ruby methods.

Rails provides [`Object#present?`][1], which is a method that is not
generally available in Ruby.  However in the changed context, the
scripts do not have access to Rails methods.

By using this adjusted approach we favor baseline Ruby methods.

[1]: https://api.rubyonrails.org/classes/Object.html#method-i-present-3F
@jeremyf jeremyf requested a review from ShanaLMoore December 14, 2023 17:05
@jeremyf jeremyf merged commit 553dec5 into hyrax-5-upgrade Dec 15, 2023
1 of 3 checks passed
@jeremyf jeremyf deleted the avoid-present-call-in-non-rails-situation branch December 15, 2023 15:15
@kirkkwang kirkkwang mentioned this pull request Jan 5, 2024
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