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

貢獻者指南

Allow multiple records attach · avo-hq/avo#2116 | Good First Issue