ar_sync icon indicating copy to clipboard operation
ar_sync copied to clipboard

更新しないモデル(create or destroyのみ)向け最適化

Open tompng opened this issue 6 years ago • 0 comments

sync_keysつけてsubscribeする意味がないし、そういうレコードは大体取得するデータの枝葉にあたるもので数も多いはず(いいねとかそういう奴) sync_keysつけなくていいよと明示する方法があるといいはず (sync_keysフィールドを空配列返すように上書きしてしまえばとりあえず大丈夫だけど)

class いいね<ApplicationRecord
  sync_parent :comment, inverse_of :ぃぃねs
  sync_has_data :id, :userId, :createdAt
  sync_そういうのいらん! # を表すいい名前
end

tompng avatar Nov 27 '19 15:11 tompng