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

Visibility dirty tracking #514

Merged
merged 1 commit into from Oct 7, 2020
Merged

Visibility dirty tracking #514

merged 1 commit into from Oct 7, 2020

Conversation

cjcolvar
Copy link
Member

@cjcolvar cjcolvar commented Jul 29, 2020

Prior to this PR, dirty tracking of visibility was implemented in a limited, custom way. #visibility_changed? with no arguments was the only method implemented. Switching to ActiveModel::Dirty makes dirty tracking support more standard and with more available methods (including #visibility_changed? with :from and :to keyword arguments).

Changes proposed in this pull request:

  • Implement ActiveModel::Dirty for visibility
  • Make child gems match parent hydra-head rails version dependencies
  • Remove outdated handling of activemodel < 4.2 in unit specs

@samvera/hydra-head

@cjcolvar
Copy link
Member Author

Testing in Hyrax showed that there is a small behavior change introduced by this change (at least in Hyrax). This change causes the access_control object of a work to be initialized instead of nil after initializing the work due to the after_initialize callback running. From what I can tell this does not lead to any appreciable change with nothing being persisted to Fedora.

@no-reply
Copy link
Member

no-reply commented Oct 7, 2020

This change causes the access_control object of a work to be initialized instead of nil after initializing the work due to the after_initialize callback running. From what I can tell this does not lead to any appreciable change with nothing being persisted to Fedora.

it probably adds at least one HTTP HEAD request, since AF makes those calls when initializing objects. it's probably fair to consider that an AF issue, though.

@no-reply no-reply merged commit 98e4c99 into master Oct 7, 2020
@no-reply no-reply deleted the visibility_dirty branch October 7, 2020 17:06
marrus-sh added a commit to samvera/hyrax that referenced this pull request Nov 28, 2022
This isn’t necessary in Hyrax 4.x, presumably due to the changes made
in <samvera/hydra-head#514>, but it is
necessary in the 3.x branch (which uses hydra-head 11.x, not 12.x).
no-reply pushed a commit to samvera/hyrax that referenced this pull request Nov 29, 2022
This isn’t necessary in Hyrax 4.x, presumably due to the changes made
in <samvera/hydra-head#514>, but it is
necessary in the 3.x branch (which uses hydra-head 11.x, not 12.x).
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.

None yet

2 participants