nas/app/serializers/rest/list_serializer.rb
KMY(雪あすか) f8280ca5d9
Add: #95 リストへの新着投稿通知 (#192)
* Add: テーブル定義、内部処理

* Add: 通知の定期削除処理、自動削除、テスト

* Add: Web画面の表示、設定

* Fix test
2023-10-31 08:59:31 +09:00

23 lines
440 B
Ruby

# frozen_string_literal: true
class REST::ListSerializer < ActiveModel::Serializer
attributes :id, :title, :replies_policy, :exclusive, :notify
def id
object.id.to_s
end
class AntennaSerializer < ActiveModel::Serializer
attributes :id, :title, :stl
def id
object.id.to_s
end
end
has_many :antennas, serializer: AntennaSerializer
def antennas
object.antennas.where(insert_feeds: true)
end
end