avo-hq/avo

Allow multiple records attach

オープン

#2,116 opened on 2023/12/17

 (2 件のコメント) (3 件のリアクション) (1 人の担当者)Ruby (308 件のフォーク)user submission
DSL-relatedDesignEnhancementFront endGood first issueHelp wantedHigh ImpactStale exempt😎 Cool

Repository metrics

Stars
 (1,778 個のスター)
PR merge metrics
 (平均マージ 1d 6h) (30d で 67 merged PRs)

説明

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

コントリビューターガイド