avo-hq/avo

Allow multiple records attach

Open

#2,116 创建于 2023年12月17日

在 GitHub 查看
 (2 评论) (3 反应) (1 负责人)Ruby (1,778 star) (308 fork)user submission
DSL-relatedDesignEnhancementFront endGood first issueHelp wantedHigh ImpactStale exempt😎 Cool

描述

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

贡献者指南