6f3c490107
This refactors the AutocompleteController according to the guidelines and boundaries discussed in https://gitlab.com/gitlab-org/gitlab-ce/issues/49653. Specifically, ActiveRecord logic is moved to different finders, which are then used in the controller. View logic in turn is moved to presenters, instead of directly using ActiveRecord's "to_json" method. The finder MoveToProjectFinder is also adjusted according to the abstraction guidelines and boundaries, resulting in a much more simple finder. By using finders (and other abstractions) more actively, we can push a lot of logic out of the controller. We also remove the need for various "before_action" hooks, though this could be achieved without using finders as well. The various finders related to AutcompleteController have also been moved into a namespace. This removes the need for calling everything "AutocompleteSmurfFinder", instead you can use "Autocomplete::SmurfFinder". |
||
---|---|---|
.. | ||
access_requestable_spec.rb | ||
avatarable_spec.rb | ||
awardable_spec.rb | ||
batch_destroy_dependent_associations_spec.rb | ||
blocks_json_serialization_spec.rb | ||
cache_markdown_field_spec.rb | ||
cacheable_attributes_spec.rb | ||
case_sensitivity_spec.rb | ||
chronic_duration_attribute_spec.rb | ||
deployment_platform_spec.rb | ||
discussion_on_diff_spec.rb | ||
each_batch_spec.rb | ||
editable_spec.rb | ||
expirable_spec.rb | ||
faster_cache_keys_spec.rb | ||
feature_gate_spec.rb | ||
group_descendant_spec.rb | ||
has_status_spec.rb | ||
has_variable_spec.rb | ||
ignorable_column_spec.rb | ||
issuable_spec.rb | ||
loaded_in_group_list_spec.rb | ||
manual_inverse_association_spec.rb | ||
mentionable_spec.rb | ||
milestoneish_spec.rb | ||
noteable_spec.rb | ||
optionally_search_spec.rb | ||
participable_spec.rb | ||
presentable_spec.rb | ||
project_features_compatibility_spec.rb | ||
prometheus_adapter_spec.rb | ||
protected_ref_access_spec.rb | ||
reactive_caching_spec.rb | ||
redis_cacheable_spec.rb | ||
relative_positioning_spec.rb | ||
resolvable_discussion_spec.rb | ||
resolvable_note_spec.rb | ||
routable_spec.rb | ||
sha_attribute_spec.rb | ||
sortable_spec.rb | ||
spammable_spec.rb | ||
strip_attribute_spec.rb | ||
subscribable_spec.rb | ||
token_authenticatable_spec.rb | ||
triggerable_hooks_spec.rb | ||
uniquify_spec.rb |