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

deprecate unused methods on NestCollectionForm #4984

Merged
merged 1 commit into from
May 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions app/forms/hyrax/forms/dashboard/nest_collection_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,37 @@ def save
persistence_service.persist_nested_collection_for(parent: parent, child: child)
end

##
# @deprecated this method is unused by hyrax, and is effectively a
# delegation to `Hyrax::Collections::NestedCollectionQueryService`.
# if you want to be sure to use nested indexing to generate this list,
# use the query service directly.
#
# For the given parent, what are all of the available collections that
# can be added as sub-collection of the parent.
def available_child_collections
Deprecation.warn "#{self.class}#available_child_collections " \
"is deprecated. the helper of the same name or " \
"Hyrax::Collections::NestedCollectionQueryService " \
"instead."

query_service.available_child_collections(parent: parent, scope: context)
end

##
# @deprecated this method is unused by hyrax, and is effectively a
# delegation to `Hyrax::Collections::NestedCollectionQueryService`.
# if you want to be sure to use nested indexing to generate this list,
# use the query service directly.
#
# For the given child, what are all of the available collections to
# which the child can be added as a sub-collection.
def available_parent_collections
Deprecation.warn "#{self.class}#available_parent_collections " \
"is deprecated. the helper of the same name or " \
"Hyrax::Collections::NestedCollectionQueryService " \
"instead."

query_service.available_parent_collections(child: child, scope: context)
end

Expand Down