avo-hq/avo

Allow multiple records attach

Aberta

#2.116 aberto em 17 de dez. de 2023

 (2 comentários) (3 reações) (1 responsável)Ruby (308 forks)user submission
DSL-relatedDesignEnhancementFront endGood first issueHelp wantedHigh ImpactStale exempt😎 Cool

Métricas do repositório

Stars
 (1.778 estrelas)
Métricas de merge de PR
 (Mesclagem média 1d 6h) (67 fundiu PRs em 30d)

Description

This will help with attaching multiple records from the same modal.

The suggestions could be added as a DSL option

field :memberships,
  as: :has_many,
  attach_suggestions: -> do
	# this would feed of the regular query that's being made to fetch the suggestions
    query.where.not(user_id: parent.id).or(query.where(user_id: nil))
  end
  • The results should be displayed using the title attribute set on the resource
  • If the resourse has the search description set, display that
  • same for avatar
  • when the user selects a few suggestions and clicks attach, we call to a new controller method to execute that logic

Image examples

Image

Guia do colaborador