JSONAPI-Resources / JSONAPI-Resources/jsonapi-resources
Including Resources
まだ誰も着手していません。
- 主要言語
- Ruby
- スター
- 2.3k
- フォーク
- 546
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I have a flash card app with the following object model:
card_set
has_many :cards
has_many :tags
card
belongs_to :card_set
habtm :tags
tag
belongs_to :card_set
habits :cards
I would like to include a card’s tags whenever a card is requested, and particularly when a card_set’s cards are requested.
What is the best way to do this? Is there any way to do this declaratively in the resource file (or elsewhere)?
The docs seem to point you towards using a ResourceSerializer and serialize_to_hash in the controller but trying this seemed a bit messy.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、issue で言及されている resource ファイルと ResourceSerializer および serialize_to_hash のパスを読みます。card リクエストと card_set の cards がどのようにシリアライズされるかを追跡し、その後、宣言的な包含をどのように表現すべきかを判断します。controller 固有のシリアライズコードなしで、要求された cards にそれらの tags が含まれるようになれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- rails, ruby
- 領域
- api, backend
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100