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

Add ActiveFedora::Relation#last. Resolves #184 #185

Merged
merged 1 commit into from
Aug 6, 2013

Conversation

acurley
Copy link
Contributor

@acurley acurley commented Aug 6, 2013

Provides convenience method to determine the last ActiveFedora object based on PID.

jeremyf added a commit that referenced this pull request Aug 6, 2013
Add ActiveFedora::Relation#last.  Resolves #184
@jeremyf jeremyf merged commit 33aafbf into samvera:master Aug 6, 2013
@acurley acurley deleted the add_last_method_for_querying branch August 6, 2013 15:55
@jcoyne
Copy link
Member

jcoyne commented Aug 6, 2013

Why are we setting @last if that variable is never used?

@acurley
Copy link
Contributor Author

acurley commented Aug 6, 2013

I was following the pattern for #first. Should I add @last to the reset method as well? I can't find when @first is actually invoked in a running app.

@jcoyne
Copy link
Member

jcoyne commented Aug 6, 2013

I guess I didn't see the ||= operator, that uses it after its defined. However, you probably want to clear the cache here: https://github.com/APTrust/active_fedora/blob/bbb77d8fe309b905859ec644abc8017699507981/lib/active_fedora/relation.rb#L17

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