gitlab-org--gitlab-foss/spec/models/concerns
Yorick Peterse 6f3c490107
Refactor AutocompleteController
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".
2018-08-20 13:53:00 +02:00
..
access_requestable_spec.rb
avatarable_spec.rb Send resize parameters for avatars 2018-08-07 06:04:33 +00:00
awardable_spec.rb
batch_destroy_dependent_associations_spec.rb Updates from rubocop -a 2018-07-09 21:13:08 +08:00
blocks_json_serialization_spec.rb
cache_markdown_field_spec.rb Use proper markdown rendering for previews 2018-07-06 18:49:33 +00:00
cacheable_attributes_spec.rb Stop relying on migrations in the CacheableAttributes cache key and cache attributes for 1 minute instead 2018-07-05 12:34:15 +02:00
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 Resolve "Rename the Master role to Maintainer" Backend 2018-07-11 14:36:08 +00:00
loaded_in_group_list_spec.rb
manual_inverse_association_spec.rb
mentionable_spec.rb Updates from rubocop -a 2018-07-09 21:13:08 +08:00
milestoneish_spec.rb
noteable_spec.rb
optionally_search_spec.rb Refactor AutocompleteController 2018-08-20 13:53:00 +02:00
participable_spec.rb
presentable_spec.rb
project_features_compatibility_spec.rb
prometheus_adapter_spec.rb
protected_ref_access_spec.rb Resolve "Rename the Master role to Maintainer" Backend 2018-07-11 14:36:08 +00:00
reactive_caching_spec.rb Squashed commit of the following: 2018-08-07 23:03:48 +09:00
redis_cacheable_spec.rb
relative_positioning_spec.rb
resolvable_discussion_spec.rb Resolve "Rename the Master role to Maintainer" Backend 2018-07-11 14:36:08 +00:00
resolvable_note_spec.rb
routable_spec.rb Remove code for dynamically generating routes 2018-07-25 16:41:29 +02:00
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